LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 05-13-2024, 05:31 PM   #4486
glennmcc
Member
 
Registered: Jan 2021
Location: North Jackson, Ohio (USA)
Distribution: slackware64-15.0, slackware64-current, slackware-14.0
Posts: 578

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335

Quote:
Originally Posted by rizitis View Post
Just an idea for doinst.sh idk if it work but as base idea i think its good
Code:
#!/bin/sh

OLD_CONFIG_DIR="/home/*/.gftp"
NEW_CONFIG_DIR="/home/*/.config/gftp"

migrate_config() {
    for user_dir in $OLD_CONFIG_DIR; do
        if [ -d "$user_dir" ]; then
            mkdir -p "$NEW_CONFIG_DIR"
            mv "$user_dir"/* "$NEW_CONFIG_DIR/"
            chown -R $(basename $user_dir):$(basename $user_dir) "$NEW_CONFIG_DIR"
        fi
    done
}

migrate_config

exit 0
edit: exit 0 I think needed this time...
That did not work.

This does.

Code:
#!/bin/sh
migrate_config() {
    for user_dir in /home/*; do
        if [ -d "$user_dir/.gftp" ]; then
            mv "$user_dir/.gftp" "$user_dir/.config/gftp"
        fi
    done
}
migrate_config
exit 0

Last edited by glennmcc; 05-13-2024 at 05:41 PM.
 
Old 05-13-2024, 05:35 PM   #4487
glennmcc
Member
 
Registered: Jan 2021
Location: North Jackson, Ohio (USA)
Distribution: slackware64-15.0, slackware64-current, slackware-14.0
Posts: 578

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
Quote:
Originally Posted by pghvlaans View Post
Would information in the ChangeLog and eventually "changes and hints" not be more appropriate for the gFTP settings change? Currently, shared-mime-info is the only package that touches $HOME at all during installation, and that's just to run update-mime-database, not move directories around.
Perhaps so.

However, since almost no-one ever reads that stuff, having doinst.sh move the dir to the new location
would eliminate the 1000 questions being posted asking...

"why did the upgrade of gFTP lose my existing settings ???"

______

If anyone would like to test it.

http://glennmcc.org/gftp-2.9.1b-x86_64-4.txz
(built on fully upgraded slackware64-current so it will not run on 15.0)

http://glennmcc.org/gftp
(includes modified slackbuild script, doinst.sh & gftp SRC code from https://github.com/masneyb/gftp )

Last edited by glennmcc; 05-13-2024 at 06:35 PM.
 
Old 05-14-2024, 01:04 AM   #4488
henca
Senior Member
 
Registered: Aug 2007
Location: Linköping, Sweden
Distribution: Slackware
Posts: 1,012

Rep: Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678
Quote:
Originally Posted by pghvlaans View Post
Currently, shared-mime-info is the only package that touches $HOME at all during installation, and that's just to run update-mime-database, not move directories around.
By definition, any package attempting to modify files in ordinary users home directories will be broken at some circumstances.

The shared-mime-info package will be broken on systems using some kind of catalog service like ldap or nis for users as those users will not be listed in the local file /etc/passwd.

The suggested method for gftp to look in /home/* will be broken for all those cases when home directories are not directly at /home/*. Maybe there are systems with home directories like /home/nfs-server1/* or something completely different. We all know that by default the root account has its home directory at /root.

However, I don't mind much that attempts to modify files in users home directories fail. IMHO no user should have his or her private files modified by a system administrator without prior conscent.

When it comes to system wide configuration files packages usually provide a .new file for manual consideration. Why would any package be more intrusive about files in home directories?

Instead of changing files in user home directories during package installation I would prefer if some script was provided which users later could choose to run manually.

Another thing to consider is those environments with multiple Slackware installations (maybe even different versions of Slackware) sharing the same home directories, maybe from an NFS server. What would happen if a package gets updated on all those machines? Will every machine alter all user home directories? Will those different versions of Slackware have the same plan for those home directories?

regards Henrik
 
4 members found this post helpful.
Old 05-14-2024, 03:52 AM   #4489
ZhaoLin1457
Senior Member
 
Registered: Jan 2018
Posts: 1,047

Rep: Reputation: 1260Reputation: 1260Reputation: 1260Reputation: 1260Reputation: 1260Reputation: 1260Reputation: 1260Reputation: 1260Reputation: 1260
Quote:
Originally Posted by glennmcc View Post
Perhaps so.

However, since almost no-one ever reads that stuff, having doinst.sh move the dir to the new location
would eliminate the 1000 questions being posted asking...

"why did the upgrade of gFTP lose my existing settings ???"

______

If anyone would like to test it.

http://glennmcc.org/gftp-2.9.1b-x86_64-4.txz
(built on fully upgraded slackware64-current so it will not run on 15.0)

http://glennmcc.org/gftp
(includes modified slackbuild script, doinst.sh & gftp SRC code from https://github.com/masneyb/gftp )
This configuration migration is not new. It has been used since the time of KDE 2.0, that's why I think that the problem of the applications is how they do this migration.

Honestly, I think it's a very bad idea for pkgtools to modify the $HOME files, and if the gFTP developers aren't interested regarding losing configuration, I don't see why we would be interested.
 
7 members found this post helpful.
Old 05-14-2024, 10:10 AM   #4490
glennmcc
Member
 
Registered: Jan 2021
Location: North Jackson, Ohio (USA)
Distribution: slackware64-15.0, slackware64-current, slackware-14.0
Posts: 578

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
Well, our opinions aside,
it's completely up to our BDFL to use or not use the "configuration migration" idea.

It's also up to him as to upgrade or not to the newer gFTP code at-all.

Last edited by glennmcc; 05-14-2024 at 10:23 AM.
 
Old 05-14-2024, 10:45 AM   #4491
glennmcc
Member
 
Registered: Jan 2021
Location: North Jackson, Ohio (USA)
Distribution: slackware64-15.0, slackware64-current, slackware-14.0
Posts: 578

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
How about a different way ?

Code:
#!/bin/sh
migrate_config() {
    for user_dir in /home/*; do
        if [ -d "$user_dir/.gftp" ]; then
            ln -s "$user_dir/.gftp" "$user_dir/.config/gftp"
        fi
    done
}
migrate_config
exit 0

Only _if_ it already exists, a symlink pointing to ~/.gftp of ~/.config/gftp will be created
thereby preventing the new gFTP code from creating 'default config files' upon its first run after the upgrade.
 
Old 05-14-2024, 11:32 AM   #4492
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,595

Rep: Reputation: 3460Reputation: 3460Reputation: 3460Reputation: 3460Reputation: 3460Reputation: 3460Reputation: 3460Reputation: 3460Reputation: 3460Reputation: 3460Reputation: 3460
The latest idea of Master Glenn is yet another proof that The Debian's Packaging Guidelines certainly is not a recommended reading for the people who does NOT build Debian packages.

However... What The HECK? Even the Debian does not mess with the users' config files and I never heard about any distribution doing so.

I for one I fully agree with ZhaoLin1457 and the other forum members who pointed that the migration of the configuration files should be done by the application itself, not by operating system or its packages management.

Last edited by LuckyCyborg; 05-14-2024 at 12:44 PM.
 
5 members found this post helpful.
Old 05-14-2024, 11:41 AM   #4493
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,595

Rep: Reputation: 3460Reputation: 3460Reputation: 3460Reputation: 3460Reputation: 3460Reputation: 3460Reputation: 3460Reputation: 3460Reputation: 3460Reputation: 3460Reputation: 3460
Quote:
Originally Posted by glennmcc View Post
Well, our opinions aside,
it's completely up to our BDFL to use or not use the "configuration migration" idea.
Honestly NO offense intended, but I bet that our BDFL's resolution regarding your idea will be an classical NOPE!

Last edited by LuckyCyborg; 05-14-2024 at 11:49 AM.
 
2 members found this post helpful.
Old 05-14-2024, 12:24 PM   #4494
glennmcc
Member
 
Registered: Jan 2021
Location: North Jackson, Ohio (USA)
Distribution: slackware64-15.0, slackware64-current, slackware-14.0
Posts: 578

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
OK, all of these objections have changed my mind.

As ZhaoLin1457 said "...if the gFTP developers aren't interested regarding losing configuration, I don't see why we would be interested."

And when the questions about lost settings start coming in, we'll be ready with the reply of...

mv ~/.gftp ~/.config/gftp


Last edited by glennmcc; 05-14-2024 at 12:43 PM.
 
1 members found this post helpful.
Old 05-14-2024, 05:56 PM   #4495
glennmcc
Member
 
Registered: Jan 2021
Location: North Jackson, Ohio (USA)
Distribution: slackware64-15.0, slackware64-current, slackware-14.0
Posts: 578

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
WOW !

That's a heck of a change in the kernel.... 6.6.30 --> 6.9.0

Jumped right on over the entire 6.7 & 6.8 series and right on up to the current mainline.

Now that's what I call a 'super bloody bleeding edge'

____

Oh oh

startx
xauth: file /root/.serverauth.1263 does not exist


X.Org X Server 1.21.1.13
X Protocol Version 11, Revision 0
Current Operating System: Linux glennmcc-server.net 6.9.0 #1 SMP PREEMPT_DYNAMIC Tue May 14 05:14:53 CDT 2024 x86_64
Kernel command line: auto BOOT_IMAGE=SlackWare64 ro root=801 vt.default_utf8=0

Current version of pixman: 0.43.4
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Tue May 14 19:48:41 2024
(==) Using config file: "/etc/X11/xorg.conf"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
additional information.(EE) (EE) Server terminated with error (1). Closing log file.oundation support at http://wiki.x.org for help. (EE) Please also check the log file at "/var/log/Xorg.0.log" forxinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error
___________

Reversal of today's upgrades currently underway.

Last edited by glennmcc; 05-14-2024 at 07:08 PM.
 
Old 05-14-2024, 06:44 PM   #4496
sombragris
Member
 
Registered: Jul 2004
Location: Asuncion, Paraguay, South America
Distribution: Slackware
Posts: 904

Rep: Reputation: 413Reputation: 413Reputation: 413Reputation: 413Reputation: 413
I'm seeing various applications crash after the latest update. For example, I saw mc crash. The only message left is "Illegal instruction".
 
Old 05-14-2024, 06:52 PM   #4497
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,686

Rep: Reputation: 1801Reputation: 1801Reputation: 1801Reputation: 1801Reputation: 1801Reputation: 1801Reputation: 1801Reputation: 1801Reputation: 1801Reputation: 1801Reputation: 1801
Probably GCC
https://bugzilla.redhat.com/show_bug.cgi?id=2272758
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114576

Last edited by willysr; 05-14-2024 at 06:55 PM.
 
1 members found this post helpful.
Old 05-14-2024, 06:54 PM   #4498
cwizardone
LQ Veteran
 
Registered: Feb 2007
Distribution: Slackware64-current with "True Multilib" and KDE4Town.
Posts: 9,164

Rep: Reputation: 7336Reputation: 7336Reputation: 7336Reputation: 7336Reputation: 7336Reputation: 7336Reputation: 7336Reputation: 7336Reputation: 7336Reputation: 7336Reputation: 7336
As reported elsewhere, I've had no problems with the 6.9.0 kernel. Everything thrown at it "just works" (so far).
 
1 members found this post helpful.
Old 05-14-2024, 06:58 PM   #4499
sombragris
Member
 
Registered: Jul 2004
Location: Asuncion, Paraguay, South America
Distribution: Slackware
Posts: 904

Rep: Reputation: 413Reputation: 413Reputation: 413Reputation: 413Reputation: 413
I'm seeing some random full lockups even on X11 and Xfce4, which require a dirty power-cycle. Maybe I should revert. Will do some additional testing.
 
Old 05-14-2024, 07:01 PM   #4500
sombragris
Member
 
Registered: Jul 2004
Location: Asuncion, Paraguay, South America
Distribution: Slackware
Posts: 904

Rep: Reputation: 413Reputation: 413Reputation: 413Reputation: 413Reputation: 413
Thank you Willy! This is consistent to what I'm experiencing. Will try to revert to the previous gcc and see what happens.
 
  


Reply



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
Apache 2.4 requests to non-SSL site with "Upgrade-Insecure-Requests: 1" and no trailing / get redirected to default site owendelong Linux - Server 2 06-22-2021 02:08 PM
[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 07:12 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