Re: [Leaf-devel] Admin script help
On 13 Apr 2002, Mike Noyes wrote: > On Sat, 2002-04-13 at 09:06, Brad Fritz wrote: > > > > On 13 Apr 2002 08:33:44 PDT Mike Noyes wrote: > > > > > Anyone, > > > Is there a way to get tar to return the date of the most recent file in > > > a tarball? > > > > > > Example: > > > $ tar tvzf leaf/devel/ddouthitt/packages/cal.lrp > > > -rwxr-xr-x root/root 9648 2001-12-17 06:42:08 usr/bin/cal > > > -rw-r--r-- root/root32 2001-12-17 06:42:21 > > > var/lib/lrpkg/cal.list > > > > > > Desired output: 2001-12-17 > > > > If you can't get tar to tell you directly, > > > > tar tvfz $TARBALL_FILE \ > > | awk '{print $4}' \ > > | sort -n \ > > | tail -n 1 > > > > might work for you. > > Brad, > Thanks. This works fairly well. I still get errors from tar, but I don't > see any way to force it to ignore them. perhaps tar tvfz $TARBALL_FILE 2>/dev/null \ | awk '{print $4}' \ | sort -n \ | tail -n 1 [...] > Now all I have to do is get the program name and version. Then determine > the libc version with ldd. > > Jeff provided this snippet for checking the libc version with ldd. > > md ${package} > cd ${package} > gunzip ${packagelrppath} > ldd `ls bin/* sbin/* usr/bin usr/sbin usr/local/bin usr/local/sbin` \ > | grep -v ':$' | sort | uniq > cd .. > rm -R ${package} perhaps #!/bin/sh TMPDIR=/tmp/lrpdd ORIGDIR=`pwd` if [ "" == "$1" ]; then echo "usage : lrpldd lrpfilename" elif [ -r "$1" ]; then mkdir $TMPDIR cd $TMPDIR tar xzf $1 find . -type f -exec ldd \{} \; 2>/dev/null \ | grep -v ':$' | sort | uniq cd $ORIGDIR rm -R $TMPDIR else echo "lrpldd : \"$1\" not found" fi would be more effective? If I provided that snippet verbatim, I must have been sleepy :) --- Jeff NewmillerThe . . Go Live... DCN:<[EMAIL PROTECTED]>Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/BatteriesO.O#. #.O#. with /Software/Embedded Controllers) .OO#. .OO#. rocks...2k --- ___ Leaf-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/leaf-devel
Re: [Leaf-devel] Admin script help
On Saturday 13 April 2002 13:14, Mike Noyes wrote: > Thanks. This works fairly well. I still get errors from tar, but I > don't see any way to force it to ignore them. Try: > Examples: > $ ./package-date.sh > test.txt 2>&1 To something like: > #! /bin/bash > find leaf/ -iname "*.lrp" | > while read file ; do > echo `basename "$file"` $'\t' \ > `tar tvzf "$file" 2>&1| awk '{print $4}' | sort -n | tail -n 1` $'\t' \ > "$file"; > done | > sort > Now all I have to do is get the program name and version. Then > determine the libc version with ldd. > > Jeff provided this snippet for checking the libc version with ldd. I added a line to check for the version # to the script: > md ${package} > cd ${package} > gunzip ${packagelrppath} > ldd `ls bin/* sbin/* usr/bin usr/sbin usr/local/bin usr/local/sbin` > \ > > | grep -v ':$' | sort | uniq awk '{print $1}' var/lib/lrpkg/${package}.version > cd .. > rm -R ${package} > > I'll have to take a look at each package to determine program name > and version. > > var/lib/lrpkg/package.help > var/lib/lrpkg/package.version > > Any suggestions for accomplishing these tasks are appreciated. > > Thanks again for the help. :-) -- ~Lynn Avants aka Guitarlynn guitarlynn at users.sourceforge.net http://leaf.sourceforge.net If linux isn't the answer, you've probably got the wrong question! ___ Leaf-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/leaf-devel
Re: [Leaf-devel] Admin script help
On Sat, 2002-04-13 at 09:06, Brad Fritz wrote: > > On 13 Apr 2002 08:33:44 PDT Mike Noyes wrote: > > > Anyone, > > Is there a way to get tar to return the date of the most recent file in > > a tarball? > > > > Example: > > $ tar tvzf leaf/devel/ddouthitt/packages/cal.lrp > > -rwxr-xr-x root/root 9648 2001-12-17 06:42:08 usr/bin/cal > > -rw-r--r-- root/root32 2001-12-17 06:42:21 > > var/lib/lrpkg/cal.list > > > > Desired output: 2001-12-17 > > If you can't get tar to tell you directly, > > tar tvfz $TARBALL_FILE \ > | awk '{print $4}' \ > | sort -n \ > | tail -n 1 > > might work for you. Brad, Thanks. This works fairly well. I still get errors from tar, but I don't see any way to force it to ignore them. Examples: $ ./package-date.sh > test.txt tar: Archive contains future timestamp 2003-03-05 03:02:00 tar: Archive contains future timestamp 2003-03-03 15:12:22 tar: Archive contains future timestamp 2003-03-05 03:02:16 tar: Archive contains future timestamp 2003-03-03 13:47:49 tar: Archive contains future timestamp 2003-03-05 03:00:48 tar: Archive contains future timestamp 2003-03-05 03:00:30 tar: Archive contains future timestamp 2003-03-03 14:03:05 tar: Archive contains future timestamp 2003-03-03 14:03:02 tar: Archive contains future timestamp 2003-03-03 14:03:02 tar: Archive contains future timestamp 2003-03-03 14:03:05 tar: Archive contains future timestamp 2003-03-05 03:00:30 tar: Archive contains future timestamp 2003-03-05 03:00:48 tar: Archive contains future timestamp 2003-03-05 03:02:16 tar: Archive contains future timestamp 2003-03-05 03:02:00 gzip: stdin has more than one entry--rest ignored tar: Child returned status 2 tar: Error exit delayed from previous errors tar: Archive contains future timestamp 2021-02-15 20:53:31 tar: Archive contains future timestamp 2021-02-16 03:57:58 gzip: stdin: unexpected end of file tar: Unexpected EOF in archive tar: Error is not recoverable: exiting now tar: Archive contains future timestamp 2021-03-01 21:58:48 tar: Archive contains future timestamp 2021-03-01 21:58:48 tar: Child died with signal 11 tar: Error exit delayed from previous errors The current shell script is: #! /bin/bash find leaf/ -iname "*.lrp" | while read file ; do echo `basename "$file"` $'\t' \ `tar tvzf "$file" | awk '{print $4}' | sort -n | tail -n 1` $'\t' \ "$file"; done | sort This provides a nice tab delimited text file, and gives me a commit order. http://leaf.sourceforge.net/pub/packages/test.txt Now all I have to do is get the program name and version. Then determine the libc version with ldd. Jeff provided this snippet for checking the libc version with ldd. md ${package} cd ${package} gunzip ${packagelrppath} ldd `ls bin/* sbin/* usr/bin usr/sbin usr/local/bin usr/local/sbin` \ | grep -v ':$' | sort | uniq cd .. rm -R ${package} I'll have to take a look at each package to determine program name and version. var/lib/lrpkg/package.help var/lib/lrpkg/package.version Any suggestions for accomplishing these tasks are appreciated. Thanks again for the help. :-) -- Mike Noyes <[EMAIL PROTECTED]> http://sourceforge.net/users/mhnoyes/ http://leaf-project.org/ ___ Leaf-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/leaf-devel
Re: [Leaf-devel] Admin script help
On 13 Apr 2002 08:33:44 PDT Mike Noyes wrote: > Anyone, > Is there a way to get tar to return the date of the most recent file in > a tarball? > > Example: > $ tar tvzf leaf/devel/ddouthitt/packages/cal.lrp > -rwxr-xr-x root/root 9648 2001-12-17 06:42:08 usr/bin/cal > -rw-r--r-- root/root32 2001-12-17 06:42:21 > var/lib/lrpkg/cal.list > > Desired output: 2001-12-17 If you can't get tar to tell you directly, tar tvfz $TARBALL_FILE \ | awk '{print $4}' \ | sort -n \ | tail -n 1 might work for you. --Brad ___ Leaf-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/leaf-devel
[Leaf-devel] Admin script help
Anyone, Is there a way to get tar to return the date of the most recent file in a tarball? Example: $ tar tvzf leaf/devel/ddouthitt/packages/cal.lrp -rwxr-xr-x root/root 9648 2001-12-17 06:42:08 usr/bin/cal -rw-r--r-- root/root32 2001-12-17 06:42:21 var/lib/lrpkg/cal.list Desired output: 2001-12-17 If possible, I'd like to use (find leaf/ -iname "*.lrp") in a loop (for/while) of some kind. I thought I would ask this time. I needlessly wasted five hours trying to sort the packages-list.txt file manually. Charles provided this shell script that performed the task in a few seconds. #! /bin/bash find leaf/ -iname "*.lrp" | while read file ; do echo `basename $file`" : $file"; done | sort I used the sed line below on the file after it was generated to create the current pacakages-list.txt file. $ sed -e 's/leaf\//http\:\/\/leaf-project\.org\//g' packages-list.txt > packages.txt -- Mike Noyes <[EMAIL PROTECTED]> http://sourceforge.net/users/mhnoyes/ http://leaf-project.org/ ___ Leaf-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/leaf-devel
[Leaf-devel] Shorewall 1.2.11 Available
In this release: 1. The 'try' command now accepts an optional timeout. If the timeout is given in the command, the standard configuration will automatically be restarted after the new configuration has been running for that length of time. This prevents a remote admin from being locked out of the firewall in the case where the new configuration starts but prevents access. 2. Kernel route filtering may now be enabled globally using the new ROUTE_FILTER parameter in /etc/shorewall/shorewall.conf. 3. Individual IP source addresses and/or subnets may now be excluded from masquerading/SNAT. 4. Simple "Yes/No" and "On/Off" values are now case-insensitive in /etc/shorewall/shorewall.conf. -Tom -- Tom Eastep\ Shorewall - iptables made easy AIM: tmeastep \ http://www.shorewall.net ICQ: #60745924 \ [EMAIL PROTECTED] ___ Leaf-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/leaf-devel