LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Closed Thread
  Search this Thread
Old 09-29-2006, 09:41 PM   #1321
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Rep: Reputation: 45

I have updated the code to be fully RSS 2.0 compliant. You can run it though the feed validator if you want.

http://www.drkstr.org/checkslack.rss

Code:
#!/usr/bin/php
<?php
## slackcheck-1.5
## by Aaron Miller
## armantic101@gmail.com
##
########################

//initialize variables
////

$strOldFile=''; $strNewFile=''; $strRSS='';
$strChangelog = 'ftp://ftp.slackware.com/pub/slackware/slackware-current/ChangeLog.txt';

//download new changelog if it has been updated.
shell_exec("wget -N -O /tmp/Changelog.new $strChangelog");

//read in both files to compare
$strOldFile = file_get_contents('/tmp/Changelog.old');
$strNewFile = file_get_contents('/tmp/Changelog.new');

//update our news ticker:
////

//check new file is dif and new file downloaded sucsesfully
if( $strOldFile != $strNewFile &&
    preg_match("/\S+/", $strNewFile) != ''
  ) {

  //update our file to check against
  file_put_contents('/tmp/Changelog.old', $strNewFile);

  //get current date
  $fhCL = fopen('/tmp/Changelog.new', 'r');
  $strDate = fgets($fhCL);
  fclose($fhCL);

  //define RSS template and add the date
  $strRSS = '<?xml version="1.0"?>'."\n".
            '<rss version="2.0">'."\n".
            '<channel>'."\n".
            '<title>Slackcheck v1.5</title>'."\n".
            '<link>http://www.drkstr.org</link>'."\n".
            '<description>Moniters the Slackware-current changelog</description>'."\n".
            '<language>en-us</language>'."\n".
            '<lastBuildDate>Fri, 29 Sep 2006 18:22:01 GMT</lastBuildDate>'."\n".
            '<generator>checkslack-1.5.php</generator>'."\n".
            '<managingEditor>armantic101@gmail.com</managingEditor>'."\n".
            '<item>'."\n".
            '<title>Slackware-current Changelog last updated on: '.trim($strDate).'</title>'."\n".
            '<link>ftp://ftp.slackware.com/pub/slackware/slackware-current/ChangeLog.txt</link>'."\n".
            '<guid>ftp://ftp.slackware.com/pub/slackware/slackware-current/ChangeLog.txt</guid>'."\n".
            '<description>Click the link to view the current Slackware-current Changelog</description>'."\n".
            '</item>'."\n".
            '</channel>'."\n".
            '</rss>'."\n";

  //save RSS file
  file_put_contents('/var/www/htdocs/checkslack.rss', $strRSS);

}


?>
You also need to add
Code:
application/rss+xml             rss
To your /etc/apache/mime.types

VOltar, I'm interested to see your changes as well. Please post them when you get a chance.

regards,
...drkstr

**edit**
note: This code can be made more efficient by only reading in the first line (the date) and comparing the two, instead of the whole file, I'll update it when I get around to it.

Last edited by drkstr; 09-30-2006 at 01:09 PM.
 
Old 09-29-2006, 10:26 PM   #1322
theoffset
Member
 
Registered: Aug 2005
Location: Guadalajara, Jal, Mexico
Distribution: Slackware Linux
Posts: 211

Rep: Reputation: 31
Quote:
Originally Posted by gmartin
See my post in this thread . I'm trying to use the 2.6x smp kernel from the Tuesday's -current. While reiserfs is supposedly compiled in, it would not boot my partition. Adding reiserfs to initrd fixed it. While I've likely done something wrong, how does one report a potential problem to Pat?
Just drop him an e-mail at volkerdi at slackware.com and describe the issue.
 
Old 09-30-2006, 01:35 AM   #1323
2Gnu
Senior Member
 
Registered: Jan 2002
Location: Southern California
Distribution: Slackware
Posts: 1,880

Rep: Reputation: 51
More changes. WWhat the heck?

Code:
Fri Sep 29 23:41:35 CDT 2006
l/libgpod-0.4.0-i486-1.tgz:  Upgraded to libgpod-0.4.0.  Thanks to Shilo Bacca.
l/pango-1.12.4-i486-1.tgz:  Fixed bogus empty GPOS table warning and other
  minor bugs.
extra/linux-smp-2.6.17.13/kernel-generic-smp-2.6.17.13-i686-2.tgz:
  Rebuilt SMP kernels setting -smp in CONFIG_LOCALVERSION, not EXTRAVERSION.
  Thanks to Tom B. for snapping me out of my old-skool ways.
extra/linux-smp-2.6.17.13/kernel-headers-smp-2.6.17.13-i386-2.tgz:  Rebuilt.
extra/linux-smp-2.6.17.13/kernel-modules-smp-2.6.17.13-i486-2.tgz:  Rebuilt.
testing/packages/iptables-1.3.6-i486-1.tgz:  This one appeared too late to be
  considered for mainline (not enough test time), but it _should_ be stable.
testing/packages/wpa_supplicant-0.4.9-i486-1.tgz:  Added wpa_supplicant-0.4.9.
  Thanks to Eric Hameleers for a good head-start on this one.
 
Old 09-30-2006, 01:42 AM   #1324
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Oh cool, wpa-supplicant is in there. I've been meaning to try that. Edit: thanks Alien Bob .
 
Old 09-30-2006, 02:01 AM   #1325
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Rep: Reputation: 45
<sign> I need an /etc/cron.halfhourly folder. I'm being left out of the loop here!

...drkstr

**edit**
there it goes. 27 minutes after the fact isn't to bad, but if Slackware 11 was released 30 minutes before then ..I wouldn't know for a whole hour!!! Something needs to change here.

**edit again**
by the way, could the person checking my RSS feed every 6 minutes please configure their news ticker to recheck no less then 30 minutes. I'll assume it's an honest mistake, but I don't have the bandwidth and might have to add the IP to hosts.deny until I get my upgraded Internet if it continues.

Sorry for the inconveniences!
...aaron

Last edited by drkstr; 09-30-2006 at 02:14 AM.
 
Old 09-30-2006, 02:47 AM   #1326
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,711
Blog Entries: 7

Rep: Reputation: 2820Reputation: 2820Reputation: 2820Reputation: 2820Reputation: 2820Reputation: 2820Reputation: 2820Reputation: 2820Reputation: 2820Reputation: 2820Reputation: 2820
Quote:
Originally Posted by Nylex
Oh cool, wpa-supplicant is in there.
Yeah! What a champion!

I wonder if Pat can be co-erced into adding a Madwifi package too?
 
Old 09-30-2006, 04:22 AM   #1327
Carpo
Member
 
Registered: Aug 2003
Location: Somewhere
Distribution: Gentoo (for now)
Posts: 364

Rep: Reputation: 30
/me starts to round up the lynch mob
 
Old 09-30-2006, 04:24 AM   #1328
Ilgar
Senior Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware64 15.0, Slackwarearm 14.2
Posts: 1,158

Rep: Reputation: 237Reputation: 237Reputation: 237
Breaking news...

Quote:
Sat Sep 30 01:52:09 CDT 2006
testing/packages/fontconfig-2.4.1-i486-1.tgz: Upgraded to fontconfig-2.4.1.
Thanks to Frédéric L. W. Meunier for pointing this out.
l/shared-mime-info-0.19-i486-1.tgz: Upgraded to shared-mime-info-0.19.
 
Old 09-30-2006, 04:57 AM   #1329
Fluggo
Member
 
Registered: Aug 2002
Location: Sweden
Distribution: Slackware
Posts: 30

Rep: Reputation: 15
RELEASE_NOTES has been updated with correct kernel versions and more. Must be closer than ever now...

Quote:
Slackware 11.0 release notes.

Today is Boomtime, the 53rd day of Bureaucracy in the YOLD 3172,
Fri Sep 29 19:09:37 CDT 2006, Moon Waxing Crescent (45% of Full).
 
Old 09-30-2006, 05:03 AM   #1330
Carpo
Member
 
Registered: Aug 2003
Location: Somewhere
Distribution: Gentoo (for now)
Posts: 364

Rep: Reputation: 30
slackware 11 is taking so long to reach us for one main reason

not too long ago pat and his wife had a child - and many sleepless nights followed, so now hes letting us all know what that feels like
 
Old 09-30-2006, 05:52 AM   #1331
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
Quote:
Originally Posted by Carpo
slackware 11 is taking so long to reach us for one main reason

not too long ago pat and his wife had a child - and many sleepless nights followed, so now hes letting us all know what that feels like
LOL you got that right!
 
Old 09-30-2006, 09:57 AM   #1332
marnold
Member
 
Registered: Dec 2005
Distribution: Slackware64 15.0 Multilib
Posts: 317

Rep: Reputation: 52
Quote:
Originally Posted by marnold
Works for me with Akregator (built in to KDE)
Unfortunately, even though there were updates to the changelog today, nothing showed up in Akregator. This is for Voltar's version of the feed.

Last edited by marnold; 09-30-2006 at 10:00 AM.
 
Old 09-30-2006, 01:00 PM   #1333
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Rep: Reputation: 45
Quote:
Originally Posted by marnold
Unfortunately, even though there were updates to the changelog today, nothing showed up in Akregator. This is for Voltar's version of the feed.
You can add mine if you don't mind setting it to repull every 30 minutes or more (it only checks for updates on the hour anyways). My ticker is showing Sat Sep 30 01:52:09 CDT 2006. I belive this is the last update, no?

I think the problem I was having is when people's news ticker was updating every 5 - 10 minutes and my internet connection couldn't take the 100+ hits per hour. I haven't had a problem since the few people still pulling from my RSS feed turned down their timers. (except for you Mr. x.x.239.221, you know who you are! If you don't update your timer by this eavning, I'm going to have to block the IP until you PM me telling me it's fixed )

regards,
...drkstr

Last edited by drkstr; 09-30-2006 at 01:05 PM.
 
Old 09-30-2006, 02:11 PM   #1334
marnold
Member
 
Registered: Dec 2005
Distribution: Slackware64 15.0 Multilib
Posts: 317

Rep: Reputation: 52
Quote:
Originally Posted by drkstr
You can add mine if you don't mind setting it to repull every 30 minutes or more (it only checks for updates on the hour anyways). My ticker is showing Sat Sep 30 01:52:09 CDT 2006. I belive this is the last update, no?

I think the problem I was having is when people's news ticker was updating every 5 - 10 minutes and my internet connection couldn't take the 100+ hits per hour. I haven't had a problem since the few people still pulling from my RSS feed turned down their timers. (except for you Mr. x.x.239.221, you know who you are! If you don't update your timer by this eavning, I'm going to have to block the IP until you PM me telling me it's fixed )
I added yours. Thanks for the offer. Akgregator is set to check the feeds once an hour so it shouldn't be a big load on your box.
 
Old 09-30-2006, 08:50 PM   #1335
Voltar
Member
 
Registered: Jan 2006
Location: Bakersfield, California
Distribution: CentOS 5.3, FreeBSD 7.2, Fedora 11
Posts: 83

Rep: Reputation: 15
Quote:
Originally Posted by drkstr
....
VOltar, I'm interested to see your changes as well. Please post them when you get a chance.

regards,
...drkstr

**edit**
note: This code can be made more efficient by only reading in the first line (the date) and comparing the two, instead of the whole file, I'll update it when I get around to it.
What I did so far...

PHP Code:
#!/usr/bin/php -q
<?php
## slackcheck-rss 0.3 Beta
## By David Johns <webmaster AT fsckoff DOT org>
##########
## Based on slackcheck-1.4 
## By Aaron Miller <armantic101 AT gmail DOT com>
##########
## Prerequisites:
##      PHP <= 5.0.0 (http://www.php.net/downloads.php)
##      wget (http://www.gnu.org/software/wget/)
####################

//  Variables (Oh! How they vary...)
  // Location of the changelog, we'll use the main Slackware server since it'll be updated first.
  
$Changelog 'ftp://ftp.slackware.com/pub/slackware/slackware-current/ChangeLog.txt';
  
// Output location for the .rss file. 
  
$RSSfile '/home/fsckoff/public_html/projects/slackcheck-rss/slackcheck.rss';

// Fetch the changelog from the Slackware server (Only if updated).
  
exec("wget -N -O /tmp/Changelog.new $Changelog");

// Enter file contents into respective variables.
  
$OldLog file_get_contents('/tmp/Changelog.old');
  
$NewLog file_get_contents('/tmp/Changelog.new');

// Compare files.
  
if( $OldLog != $NewLog ){
    
// Update file to check against.
    
file_put_contents('/tmp/Changelog.old'$NewLog);
    
// Update RSS feed.
    
$hfCL fopen('/tmp/Changelog.new''r');
    
// Get the date from the changelog.
    
$Date fgets($hfCL);
    
// Close file :-o
    
fclose($hfCL);
    
// Define and put the XML into the $RSS variable.
    
$RSS '<?xml version="1.0" encoding="utf-8"?>'."\n".
           
'<rss version="2.0">'."\n".
           
'<channel>'."\n"
           
'<title>slackcheck-rss 0.3</title>'."\n".
           
'<link>http://www.fsckoff.org/</link>'."\n".
           
'<description>Slackware-current Changelog Monitor</description>'."\n".
           
'<language>en-us</language>'."\n".
           
'<lastBuildDate>Sat, 30 Sep 2006 23:35:26 GMT</lastBuildDate>'."\n".
           
'<generator>slackcheck-rss 0.3 (PHP)</generator>'."\n".
           
'<managingEditor>webmaster@fsckoff.org</managingEditor>'."\n".
           
'<webMaster>webmaster@fsckoff.org</webMaster>'."\n".
           
'<item>'."\n".
           
'<title>Slackware-current Changelog last updated on: '.trim($Date).'</title>'."\n".
           
'<link>ftp://ftp.slackware.com/pub/slackware/slackware-current/ChangeLog.txt</link>'."\n".
           
'<guid>ftp://ftp.slackware.com/pub/slackware/slackware-current/ChangeLog.txt</guid>'."\n".
           
'<description>Click the link to view the current Slackware-current Changelog</description>'."\n".
           
'</item>'."\n".
           
'</channel>'."\n".
           
'</rss>';     
    
// Put XML ($RSS) into RSS file ($RSSfile).
    
file_put_contents($RSSfile$RSS);
}
// That's all folks :-)
?>
RSS feed is at: http://www.fsckoff.org/projects/slac...slackcheck.rss
All source and changelogs (current & future) is/will be at: http://www.fsckoff.org/projects/slackcheck-rss/

Last edited by Voltar; 09-30-2006 at 08:53 PM.
 
  


Closed Thread

Tags
advice, chat, far, general, upgrade


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Slack 10.2 slack 10.2 ran xserver after all on sata with via board devafree LinuxQuestions.org Member Success Stories 5 05-31-2006 12:54 AM
Frozen-Bubble(from slack 8.2) Not Running in slack 9 bongski55 Slackware 8 01-02-2006 05:10 PM
Slack 10.1 will a Slack 10 Wine pkg work? acummings Slackware 1 03-25-2005 05:55 AM
Using Slack 10's 2.6.7 kernel packages on Slack 10.1? SocialEngineer Slackware 1 03-05-2005 12:53 PM
cd rom error on installation media (With both slack 9,1 and slack 10) busbarn Slackware - Installation 6 07-15-2004 04:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration