LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-16-2009, 12:51 AM   #1
grissiom
Member
 
Registered: Apr 2008
Location: China, Beijing
Distribution: Slackware
Posts: 423

Rep: Reputation: 45
slackpkg failed to find /usr/lib64/man.conf.new or man.conf should be in /etc?


slackpkg only look for .new files in /etc, right? But man has it's configuration file in /usr/lib(64)...

I see man was configured with
Code:
CFLAGS="$SLKCFLAGS" \
./configure +lang all +traditional -confdir /usr/lib${LIBDIRSUFFIX}
in man.SlackBuild.
so why use -confdir /usr/lib${LIBDIRSUFFIX}? Or slackpkg should add a exception for it?
 
Old 08-16-2009, 07:18 AM   #2
wadsworth
Member
 
Registered: Aug 2007
Distribution: Slackware64 13.37
Posts: 215

Rep: Reputation: 65
In addition to /usr/lib/man.conf.new, I also missed:
/usr/share/vim/vimrc.new.

I think it's been there since May.
 
Old 08-16-2009, 08:27 AM   #3
grissiom
Member
 
Registered: Apr 2008
Location: China, Beijing
Distribution: Slackware
Posts: 423

Original Poster
Rep: Reputation: 45
Hmm, horrible... Maybe slackpkg should grab all the .new files from something like /var/log/packages/* and check the existence of them. Rather than find .new files in some directories...
 
Old 08-16-2009, 09:22 AM   #4
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Gentoo on headless; Arch on everything that requires a GUI
Posts: 6,941

Rep: Reputation: 137Reputation: 137
Write PiterPunk and suggest it.
 
Old 08-16-2009, 09:58 AM   #5
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
Quote:
Originally Posted by Bruce Hill View Post
Write PiterPunk and suggest it.
Indeed, that'd be the most appropriate sol'n in the long term. Meanwhile, depend on:

shell# find / -name *.new

to be sure.

Sasha
 
Old 08-16-2009, 10:10 AM   #6
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Gentoo on headless; Arch on everything that requires a GUI
Posts: 6,941

Rep: Reputation: 137Reputation: 137
grissiom knows find ... actually, write Piter with your fix in "diff -u"

That's what I've done, and he responds.
 
Old 08-16-2009, 10:59 PM   #7
grissiom
Member
 
Registered: Apr 2008
Location: China, Beijing
Distribution: Slackware
Posts: 423

Original Poster
Rep: Reputation: 45
Quote:
Originally Posted by GrapefruiTgirl View Post
Indeed, that'd be the most appropriate sol'n in the long term. Meanwhile, depend on:

shell# find / -name *.new

to be sure.

Sasha
This will be painful..... ;(
 
Old 08-16-2009, 11:02 PM   #8
grissiom
Member
 
Registered: Apr 2008
Location: China, Beijing
Distribution: Slackware
Posts: 423

Original Poster
Rep: Reputation: 45
Quote:
Originally Posted by Bruce Hill View Post
grissiom knows find ... actually, write Piter with your fix in "diff -u"

That's what I've done, and he responds.
Thanks for the suggestion~ I hope I could write the patch... Hmm, a busy night...
 
Old 08-17-2009, 01:19 AM   #9
grissiom
Member
 
Registered: Apr 2008
Location: China, Beijing
Distribution: Slackware
Posts: 423

Original Poster
Rep: Reputation: 45
Ok, here is the patch: (I have mailed Piter as well)
Code:
--- a/usr/libexec/slackpkg/functions.d/post-functions.sh        2009-07-27 09:33:49.000000000 +0800
+++ b/usr/libexec/slackpkg/functions.d/post-functions.sh        2009-08-17 13:59:36.546147926 +0800
@@ -113,21 +113,22 @@                                                                              
                                                                                                   
 looknew() {                                                                                       
                                                                                                   
-       # with ONLY_NEW_DOTNEW set, slackpkg will search only for                                  
-       # .new files installed in actual slackpkg's execution                                      
-       if [ "$ONLY_NEW_DOTNEW" = "on" ]; then                                                     
-               ONLY_NEW_DOTNEW="-cnewer $TMPDIR/timestamp"                                        
-       else                                                                                       
-               ONLY_NEW_DOTNEW=""                                                                 
-       fi                                                                                         
-                                                                                                  
        echo -e "\nSearching for NEW configuration files"                                          
-       FILES=$(find /etc -name "*.new" ${ONLY_NEW_DOTNEW} \                                       
-               -not -name "rc.inet1.conf.new" \                                                   
-               -not -name "group.new" \                                                           
-               -not -name "passwd.new" \                                                          
-               -not -name "shadow.new" \                                                          
-               -not -name "gshadow.new" 2>/dev/null)                                              
+       DOTNEWFILES=$(gzip -cd ${WORKDIR}/*-dotnew-filelist.gz)                                    
+       FILES=''
+       for i in $DOTNEWFILES; do
+               # with ONLY_NEW_DOTNEW set, slackpkg will search only for .new
+               # files installed in actual slackpkg's execution
+               if [ "$ONLY_NEW_DOTNEW" = "on" ]; then
+                       if [ "/${i}" -nt "$TMPDIR/timestamp" ]; then
+                               FILES=$FILES' '${i}
+                       fi
+               else
+                       if [ -r "/${i}" ]; then
+                               FILES=$FILES' '${i}
+                       fi
+               fi
+       done
        if [ "$FILES" != "" ]; then
                echo -e "\n\
 Some packages had new configuration files installed.
--- a/usr/libexec/slackpkg/core-functions.sh    2009-07-27 09:33:49.000000000 +0800
+++ b/usr/libexec/slackpkg/core-functions.sh    2009-08-17 13:57:01.685149882 +0800
@@ -937,6 +937,10 @@
        for i in $DIRS; do
                bunzip2 -c $TMPDIR/${i}-MANIFEST.bz2 | awk -f /usr/libexec/slackpkg/filelist.awk | \
                        gzip > ${TMPDIR}/${i}-filelist.gz
+               bunzip2 -c $TMPDIR/${i}-MANIFEST.bz2 | grep -Eo '[^ ]*\.new$' | \
+                       sed -e '/etc\/group.new$/d' -e '/etc\/passwd.new$/d' -e '/etc\/shadow.new$/d' \
+                           -e '/etc\/gshadow.new$/d' -e '/etc\/rc.d\/rc.inet1.conf.new$/d' | \
+                       gzip > ${TMPDIR}/${i}-dotnew-filelist.gz
        done
        cp ${TMPDIR}/*-filelist.gz ${WORKDIR}/
This algorithm does not search for third-party .new files. Should slackpkg take care for third-party packages? I don't think so..
 
Old 08-17-2009, 08:12 AM   #10
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
IMHO it should -- just because it'd be handy:

A) identify any .new files created by anything it (slackpkg) installs.

B) (maybe as an option?) be able to locate any .new files anywhere/from any location or installed item. Given the relative easiness of implementing such a search, then why not?


Sasha
 
Old 08-17-2009, 08:13 PM   #11
grissiom
Member
 
Registered: Apr 2008
Location: China, Beijing
Distribution: Slackware
Posts: 423

Original Poster
Rep: Reputation: 45
Quote:
Originally Posted by GrapefruiTgirl View Post
IMHO it should -- just because it'd be handy:

A) identify any .new files created by anything it (slackpkg) installs.

B) (maybe as an option?) be able to locate any .new files anywhere/from any location or installed item. Given the relative easiness of implementing such a search, then why not?


Sasha
Hmm, I think slackpkg doesn't _have_ to have this feature. But yes, I _have_ to admit it is handy So here is an other patch against slackpkg-2.80.2-noarch-3: (/usr/libexec/slackpkg/core-functions.sh remain unchanged)
Code:
--- a/usr/libexec/slackpkg/functions.d/post-functions.sh       2009-07-27 09:33:49.000000000 +0800                                                                            
+++ b/usr/libexec/slackpkg/functions.d/post-functions.sh 2009-08-18 01:45:33.706801788 +0800                                    
@@ -113,21 +113,27 @@                                                                                                          
                                                                                                                               
 looknew() {                                                                                                                   
                                                                                                                               
-       # with ONLY_NEW_DOTNEW set, slackpkg will search only for                                                              
-       # .new files installed in actual slackpkg's execution                                                                  
-       if [ "$ONLY_NEW_DOTNEW" = "on" ]; then                                                                                 
-               ONLY_NEW_DOTNEW="-cnewer $TMPDIR/timestamp"                                                                    
-       else                                                                                                                   
-               ONLY_NEW_DOTNEW=""                                                                                             
-       fi                                                                                                                     
-                                                                                                                              
        echo -e "\nSearching for NEW configuration files"
-       FILES=$(find /etc -name "*.new" ${ONLY_NEW_DOTNEW} \
-               -not -name "rc.inet1.conf.new" \
-               -not -name "group.new" \
-               -not -name "passwd.new" \
-               -not -name "shadow.new" \
-               -not -name "gshadow.new" 2>/dev/null)
+       #DOTNEWFILES=$(gzip -cd ${WORKDIR}/*-dotnew-filelist.gz)
+       DOTNEWFILES=$(cat /var/log/packages/* | \
+               grep -Eo '[^ ]*\.new$' | \
+               sed -e '/etc\/group.new$/d' -e '/etc\/passwd.new$/d' -e '/etc\/shadow.new$/d' \
+                   -e '/etc\/gshadow.new$/d' -e '/etc\/rc.d\/rc.inet1.conf.new$/d')
+
+       FILES=''
+       for i in $DOTNEWFILES; do
+               # with ONLY_NEW_DOTNEW set, slackpkg will search only for .new
+               # files installed in actual slackpkg's execution
+               if [ "$ONLY_NEW_DOTNEW" = "on" ]; then
+                       if [ "/${i}" -nt "$TMPDIR/timestamp" ]; then
+                               FILES=$FILES' /'${i}
+                       fi
+               else
+                       if [ -e "/${i}" ]; then
+                               FILES=$FILES' /'${i}
+                       fi
+               fi
+       done
        if [ "$FILES" != "" ]; then
                echo -e "\n\
 Some packages had new configuration files installed.
 
Old 08-17-2009, 08:21 PM   #12
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
Very cool -- nice work! Wonder what PiterPunk will have to say. Do let us know

PS - I agree with you -- it doesn't NEED the extra option for `find all` but it IS/would-be handy.

Sasha
 
Old 08-18-2009, 02:57 AM   #13
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Gentoo on headless; Arch on everything that requires a GUI
Posts: 6,941

Rep: Reputation: 137Reputation: 137
You can find out what Piter PUNK thinks here:
Code:
/usr/doc/slackpkg-2.80.2/ChangeLog
or whatever your current version happens to be.
 
  


Reply


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
squid conf: squid failed when I type insert redirect_program /usr/bin/squidguard laxmantsharma Linux - Software 1 02-24-2009 06:02 AM
/usr/local/man/man8 dragunu Linux - Newbie 1 11-12-2006 06:43 PM
waht file have paths for man? man.conf? where? xcore_on Linux - Newbie 4 05-23-2006 09:38 AM
squid conf: squid failed when I type insert redirect_program /usr/bin/squidguard Niceman2005 Linux - Software 1 11-24-2004 02:29 PM
/usr/share/man/manX secprovider Linux - General 1 08-20-2003 11:46 AM

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

All times are GMT -5. The time now is 10:47 AM.

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