LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 01-26-2020, 12:43 PM   #4366
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 2,493

Rep: Reputation: 8437Reputation: 8437Reputation: 8437Reputation: 8437Reputation: 8437Reputation: 8437Reputation: 8437Reputation: 8437Reputation: 8437Reputation: 8437Reputation: 8437

Quote:
Originally Posted by upnort View Post
Pat, please consider a policy that patches never overwrite /etc files, including /etc/rc.d scripts. The policy should include third party repos such SBo.

Not an exhaustive list but the following rc.d scripts are overwritten when patched:

rc.acpid
rc.alsa
rc.httpd
rc.messagebus
rc.ntpd
rc.sshd
rc.sysstat
rc.udev

Overwriting certain rc.d scripts might seem reasonable, but a fair counter offer is all /etc files should be left untouched to be reviewed by the user/admin.

Thanks!
The majority of your list actually isn't overwritten. I think there's a reasonable balance currently, but feel free to make a case for individual files. Or you could always use chattr(1) to make some files immutable.
 
2 members found this post helpful.
Old 01-26-2020, 02:50 PM   #4367
upnort
Senior Member
 
Registered: Oct 2014
Distribution: Slackware
Posts: 1,893

Rep: Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161
Quote:
The majority of your list actually isn't overwritten
I lazily created the list from the following:

Code:
for pkg in $(find source -name doinst.sh.gz); do zgrep rc.d $pkg | grep mv | grep "new etc"; done
I ran that one-liner on the original source tree and not the patches tree. I did not individually inspect each doinst.sh. As ponce noted, some of the doinst.sh scripts contain comments explaining why the script is overwritten.

Quote:
feel free to make a case for individual files
While there is the mantra of "read the change log," perhaps when the rc.d script is overwritten rather than install a *.new file, the original file is preserved with an *.old file. Users/admins can compare changes.
 
Old 01-26-2020, 03:50 PM   #4368
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Original Poster
Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
Quote:
Originally Posted by upnort View Post
I lazily created the list from the following:

Code:
for pkg in $(find source -name doinst.sh.gz); do zgrep rc.d $pkg | grep mv | grep "new etc"; done
I ran that one-liner on the original source tree and not the patches tree. I did not individually inspect each doinst.sh. As ponce noted, some of the doinst.sh scripts contain comments explaining why the script is overwritten.


While there is the mantra of "read the change log," perhaps when the rc.d script is overwritten rather than install a *.new file, the original file is preserved with an *.old file. Users/admins can compare changes.
I'd be inclined to say that if you can make a reasonable case as to *why* one of the currently-overwritten init scripts would *need* to be edited by the sysadmin, i.e. the edit could not be better accomplished by a change elsewhere, then that could be convincing.

As it stands, the "just in case" thing has bitten us in the ass at least once or twice (this is at least why rc.udev is overwritten).

EDIT for additions: I seem to recall the same for rc.messagebus, and for rc.sshd, there was a "lock you out of the system" bug in it many years ago that necessitated overwriting the old one. That one in particular is a good example of "pretty much anything you think might require an rc.sshd edit is instead configurable in /etc/ssh/*"

Last edited by rworkman; 01-26-2020 at 03:53 PM.
 
Old 01-26-2020, 04:47 PM   #4369
upnort
Senior Member
 
Registered: Oct 2014
Distribution: Slackware
Posts: 1,893

Rep: Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161
Quote:
As it stands, the "just in case" thing has bitten us in the ass at least once or twice (this is at least why rc.udev is overwritten).
Yes, I vaguely remember such moments.

That still leaves open the idea of creating *old files when there is an upstream decision to explicitly overwrite the files. Not arguing or frothing, just offering an idea.
 
Old 01-26-2020, 04:52 PM   #4370
bifferos
Member
 
Registered: Jul 2009
Posts: 401

Rep: Reputation: 149Reputation: 149
zerofree

There's a program called zerofree that's very handy when distributing virtual machines. It zeroes out unused disk blocks which can usually then be compressed by a tool provided with your virtualisation software.

The most convenient way to use it is from a bootable DVD where you don't have the fs mounted, unless you want to deal with the caveats of a read-only fs. For this reason I'd love to see it make its way into the Slackware initrd, or perhaps as a bare executable in the /extra directory (this latter being what I now do with all my generated -current ISO images). It's not very large:

Code:
bash-5.0# ls -l `which zerofree`
-rwxr-xr-x 1 root root 14432 Jan 10 23:12 /usr/sbin/zerofree
thanks for your consideration,
Biff.
 
2 members found this post helpful.
Old 01-26-2020, 08:52 PM   #4371
upnort
Senior Member
 
Registered: Oct 2014
Distribution: Slackware
Posts: 1,893

Rep: Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161
I don't know if you are aware, but zerofree is available at SBo.
 
Old 01-27-2020, 04:20 PM   #4372
USUARIONUEVO
Senior Member
 
Registered: Apr 2015
Posts: 2,332

Rep: Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930
ninja-1.10.0 released
https://github.com/ninja-build/ninja...v1.10.0.tar.gz

sqlite-3.31.1
https://www.sqlite.org/2020/sqlite-a...on-3310100.zip

qpdf-9.1.1
https://github.com/qpdf/qpdf/archive...f-9.1.1.tar.gz

Last edited by USUARIONUEVO; 01-27-2020 at 04:23 PM.
 
Old 01-27-2020, 06:40 PM   #4373
USUARIONUEVO
Senior Member
 
Registered: Apr 2015
Posts: 2,332

Rep: Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930
cups-filters-1.27.0
http://openprinting.org/download/cup...-1.27.0.tar.xz
 
Old 01-28-2020, 01:11 PM   #4374
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Looks like the bump of gnome-doc-utils in linuxdoc-utils has a broken xml2po. Most everything has switched to python3, but it still compiles the xml2po module with python2. I found it is due to the ./configure for gnome-doc-utils uses the default system python (which is obviously python2 on Slackware), but that can be overridden by passing PYTHON=python3 to the ./configure in the gnome-doc-utils section of the linuxdocs-utils.build script and this will produce a python3 xml2po module.

Code:
--- ./source/ap/linuxdoc-tools/trackbuild.linuxdoc-tools
+++ ./source/ap/linuxdoc-tools/trackbuild.linuxdoc-tools
@@ -1047,6 +1047,7 @@
 CFLAGS="$SLKCFLAGS" \
 CXXFLAGS="$SLKCFLAGS" \
 CPPFLAGS="$SLKCFLAGS" \
+PYTHON=python3 \
 ./configure \
   --prefix=/usr \
   --libdir=/usr/lib${LIBDIRSUFFIX} \
See this post for where the issue was reported.
 
2 members found this post helpful.
Old 01-28-2020, 03:01 PM   #4375
USUARIONUEVO
Senior Member
 
Registered: Apr 2015
Posts: 2,332

Rep: Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930
Quote:
Originally Posted by bassmadrigal View Post
Looks like the bump of gnome-doc-utils in linuxdoc-utils has a broken xml2po. Most everything has switched to python3, but it still compiles the xml2po module with python2. I found it is due to the ./configure for gnome-doc-utils uses the default system python (which is obviously python2 on Slackware), but that can be overridden by passing PYTHON=python3 to the ./configure in the gnome-doc-utils section of the linuxdocs-utils.build script and this will produce a python3 xml2po module.

Code:
--- ./source/ap/linuxdoc-tools/trackbuild.linuxdoc-tools
+++ ./source/ap/linuxdoc-tools/trackbuild.linuxdoc-tools
@@ -1047,6 +1047,7 @@
 CFLAGS="$SLKCFLAGS" \
 CXXFLAGS="$SLKCFLAGS" \
 CPPFLAGS="$SLKCFLAGS" \
+PYTHON=python3 \
 ./configure \
   --prefix=/usr \
   --libdir=/usr/lib${LIBDIRSUFFIX} \
See this post for where the issue was reported.
Maybe , as some people request , do python3 the default python , python2 goes deprecated fast , i see projects removing python2 support, or no build tools if no python3 the python system...but this need some big work and test under slackbuild scripts.
 
Old 01-28-2020, 04:06 PM   #4376
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by USUARIONUEVO View Post
Maybe , as some people request , do python3 the default python , python2 goes deprecated fast , i see projects removing python2 support, or no build tools if no python3 the python system...but this need some big work and test under slackbuild scripts.
I think Pat's plan is to keep python pointing to python2 until python2 is removed. python3 doesn't create a symlink like python2 did, so once python2 is sent to pasture/ or removed completely, /usr/bin/python will no longer exist.

https://www.linuxquestions.org/quest...ml#post6049725
 
3 members found this post helpful.
Old 01-28-2020, 05:53 PM   #4377
USUARIONUEVO
Senior Member
 
Registered: Apr 2015
Posts: 2,332

Rep: Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930
Quote:
Originally Posted by bassmadrigal View Post
I think Pat's plan is to keep python pointing to python2 until python2 is removed. python3 doesn't create a symlink like python2 did, so once python2 is sent to pasture/ or removed completely, /usr/bin/python will no longer exist.

https://www.linuxquestions.org/quest...ml#post6049725
like archlinux do ..we can

Code:
  # Why are these not done by default...
  ln -s python3               "${pkgdir}"/usr/bin/python
  ln -s python3-config        "${pkgdir}"/usr/bin/python-config
  ln -s idle3                 "${pkgdir}"/usr/bin/idle
  ln -s pydoc3                "${pkgdir}"/usr/bin/pydoc
  ln -s python${_pybasever}.1 "${pkgdir}"/usr/share/man/man1/python.1
and later, python2 ..as only python2 .... like python3 does now.
 
Old 01-28-2020, 07:02 PM   #4378
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by USUARIONUEVO View Post
like archlinux do ..we can

Code:
  # Why are these not done by default...
  ln -s python3               "${pkgdir}"/usr/bin/python
  ln -s python3-config        "${pkgdir}"/usr/bin/python-config
  ln -s idle3                 "${pkgdir}"/usr/bin/idle
  ln -s pydoc3                "${pkgdir}"/usr/bin/pydoc
  ln -s python${_pybasever}.1 "${pkgdir}"/usr/share/man/man1/python.1
and later, python2 ..as only python2 .... like python3 does now.
In python2, the symlinks are automatically created, in python3, they are not. Pat tries to keep things vanilla, so changing what upstream intends for something like this seems contrary to what Slackware aims to do. There's no technical issue that requires a /usr/bin/python symlink, but it does simplify (and complicate) some situations. If everyone just specifically referenced the python version they want to use in their code, this problem would never exist.

Plus if the symlink for python3 is made, it could cause issues with any legacy software that actually requires python2 and doesn't work with python3.

And then in 10 years when python3 is EOL and python4 is out, we'd have to go through the same process...

Last edited by bassmadrigal; 01-28-2020 at 07:04 PM.
 
3 members found this post helpful.
Old 01-29-2020, 03:18 AM   #4379
drmozes
Slackware Contributor
 
Registered: Apr 2008
Distribution: Slackware
Posts: 1,535

Rep: Reputation: 1305Reputation: 1305Reputation: 1305Reputation: 1305Reputation: 1305Reputation: 1305Reputation: 1305Reputation: 1305Reputation: 1305Reputation: 1305
Quote:
Originally Posted by bassmadrigal View Post
Looks like the bump of gnome-doc-utils in linuxdoc-utils has a broken xml2po. Most everything has switched to python3, but it still compiles the xml2po module with python2. I found it is due to the ./configure for gnome-doc-utils uses the default system python (which is obviously python2 on Slackware), but that can be overridden by passing PYTHON=python3 to the ./configure in the gnome-doc-utils section of the linuxdocs-utils.build script and this will produce a python3 xml2po module.
Thanks for the report and patch.
 
Old 01-29-2020, 03:38 AM   #4380
bifferos
Member
 
Registered: Jul 2009
Posts: 401

Rep: Reputation: 149Reputation: 149
Quote:
Originally Posted by upnort View Post
I don't know if you are aware, but zerofree is available at SBo.
Sorry for the late reply, yes I am, however it needs to be on a (not necessarily the Slackware) bootable DVD, or accessible from there so I can easily run it with my rootfs unmounted.

So I have been:

1) Compiling zerofree from slackbuilds (as in your link)
2) Dumping my install ISO contents
3) Copying zerofree into the slackware /extra directory
4) Re-building my Slackware install DVD ISO.

Then I just boot the Slackware DVD and execute zerofree from extra.

Latterly I've been putting it directly in the initrd. I've written some (fairly crude) code to 'install' my packages into the uncompressed initrd (less manual pages, header files etc...) so I don't have to do it manually:
https://github.com/bifferos/vagaslac...lpkg_initrd.py
Because that wasn't the only thing I wanted to add.

Last edited by bifferos; 01-29-2020 at 03:48 AM.
 
2 members found this post helpful.
  


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
[SOLVED] Requests for -current (20151216) rworkman Slackware 3441 12-28-2017 03:50 PM

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

All times are GMT -5. The time now is 12:32 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