Re: [lfs-support] Getting in Chapter 5 [SOLVED][RESURRECTED]
On 10/13/2013 11:02 PM, Bruce Dubbs wrote: > Drew Ames wrote: >> On 10/13/2013 06:48 PM, Dan McGhee wrote: >>> I got to chroot and the copied su from shadow in Ch 5 didn't work. I >>> can find no reason that it didn't. What I want to do now is compile it >>> in chroot environment and install only it there. Just in case I missed >>> some kind of linking. That seems unlikely, but ldd /tools/bin/su >>> (on the copied version) provided: linux-vdso.so.1 (0x79b38000) libcrypt.so.1 => /tools/lib/libcrypt.so.1 (0x7f20fb668000) libc.so.6 => /tools/lib/libc.so.6 (0x7f20fb2b8000) /tools/lib64/ld-linux-x86-64.so.2 (0x7f20fb8a) >>> as did ldd on my DESTDIR install, so it looks like everything is there. >>> >>> >> Dan, Bruce, and Ken, >> >> I've been following this thread with interest. I'm into my fourth LFS >> build, using LFS 7.4. >> >> For my previous three builds, I successfully use the package user hint >> without any problems. Now I'm facing the same issues as Dan. >> >> I tried building su from an old source at this link, starting at line 802: >> >> http://wiki.linuxfromscratch.org/hints/browser/trunk/PREVIOUS_FORMAT/more_control_and_pkg_man.txt?rev=904 >> >> I built it with GCC at the end of chapter 5 (I typed 'gcc -o su su.c'), >> then copied it to /tools/bin. >> When I got to chapter 6, as the root user in the chroot environment, >> that copy of su would not switch users to the linux-libc-headers user I >> created for the first package. I got the error: >> >> bash: /tools/bin/su: No such file or directory >> >> I then copied su from the host system and got the same results. >> >> Dan, when you say that su didn't work for you. Did you get an error message? > I don't know, but I wonder if the problem is the lack of passwd, group, > shadow, etc files. You need to track the source to find out. Just add > printf statements at strategic places. Bruce, I think your on to something. Thank goodness for this list. Many times I can get into a "thinking rut" when I'm troubleshooting. Fresh minds really help. I'm thinking that the previous version of su supplied with coreutils was a "stand alone" binary. The versions supplied now by shadow and util-linux depend on "auxiliary stuff" as you mentioned; i.e., we don't install su from util-linux because it depends on pam, which we don't use. Shadow, I think, integrally supplies the monitoring that pam does. When I examined shadow's "configure --help" this AM, I found this: > --enable-shadowgrp enable shadow group support [default=yes] > ... > --enable-account-tools-setuid > Install the user and group management tools setuid > and authenticate the callers. This requires > --with-pam. Additionally, shadow tracks the number of logins, failed logins and all that other stuff. But I don't know how few of these additional files are needed to run it. If someone were familiar with printf, Bruce, I think you're right. :) I've been trying to learn about it this morning and know that I can change decimal numbers to octal or hex or any combination of that. I found that I can make pretty tables and center text, but I could find no examples of how to use it in the way you described. What kind of "strategic places" were you thinking and in what context? Until I understand more than what I do now about printf, I need to use brute force. :) My first thought is to try to use shadow's su from my DESTIR install without configuring shadow. If this works, I could then start removing stuff from DESTDIR/bin until su fails. Absent success there, I could do the same thing in chroot environment. I don't like to "erase the slate" but I could always "nuke" my build thus far, bring in my backed up /tools, and do the shadow stuff as lfs. For the "package users" who are monitoring this thread, Rob Taylor installed and configured shadow at the beginng Ch. 6. He then overwrote it in its regular sequence. There were a few "hiccups" as he noted in his build notes, but package users know how to get past those. :) Here's a link to his notes: https://www.javacrypt.com/lfs/my_lfs_7_4_notes.txt I'm always interested in learning more about this stuff. I would appreciate it, Bruce, if you could share some of your ideas about the printf strategy, if you can spare the time. Thanks, Dan -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: [lfs-support] Getting in Chapter 5 [SOLVED][RESURRECTED]
Dan McGhee wrote: > On 10/13/2013 11:02 PM, Bruce Dubbs wrote: >> Drew Ames wrote: >>> On 10/13/2013 06:48 PM, Dan McGhee wrote: I got to chroot and the copied su from shadow in Ch 5 didn't work. I can find no reason that it didn't. What I want to do now is compile it in chroot environment and install only it there. Just in case I missed some kind of linking. That seems unlikely, but ldd /tools/bin/su (on the copied version) provided: > linux-vdso.so.1 (0x79b38000) > libcrypt.so.1 => /tools/lib/libcrypt.so.1 (0x7f20fb668000) > libc.so.6 => /tools/lib/libc.so.6 (0x7f20fb2b8000) > /tools/lib64/ld-linux-x86-64.so.2 (0x7f20fb8a) as did ldd on my DESTDIR install, so it looks like everything is there. > >>> Dan, Bruce, and Ken, >>> >>> I've been following this thread with interest. I'm into my fourth LFS >>> build, using LFS 7.4. >>> >>> For my previous three builds, I successfully use the package user hint >>> without any problems. Now I'm facing the same issues as Dan. >>> >>> I tried building su from an old source at this link, starting at line 802: >>> >>> http://wiki.linuxfromscratch.org/hints/browser/trunk/PREVIOUS_FORMAT/more_control_and_pkg_man.txt?rev=904 >>> >>> I built it with GCC at the end of chapter 5 (I typed 'gcc -o su su.c'), >>> then copied it to /tools/bin. >>> When I got to chapter 6, as the root user in the chroot environment, >>> that copy of su would not switch users to the linux-libc-headers user I >>> created for the first package. I got the error: >>> >>> bash: /tools/bin/su: No such file or directory >>> >>> I then copied su from the host system and got the same results. >>> >>> Dan, when you say that su didn't work for you. Did you get an error message? >> I don't know, but I wonder if the problem is the lack of passwd, group, >> shadow, etc files. You need to track the source to find out. Just add >> printf statements at strategic places. > Bruce, I think your on to something. Thank goodness for this list. Many > times I can get into a "thinking rut" when I'm troubleshooting. Fresh > minds really help. > > I'm thinking that the previous version of su supplied with coreutils was > a "stand alone" binary. The versions supplied now by shadow and > util-linux depend on "auxiliary stuff" as you mentioned; i.e., we don't > install su from util-linux because it depends on pam, which we don't > use. Shadow, I think, integrally supplies the monitoring that pam does. > When I examined shadow's "configure --help" this AM, I found this: > >> --enable-shadowgrp enable shadow group support [default=yes] >> ... >> --enable-account-tools-setuid >> Install the user and group management tools setuid >> and authenticate the callers. This requires >> --with-pam. > Additionally, shadow tracks the number of logins, failed logins and all > that other stuff. But I don't know how few of these additional files are > needed to run it. > > If someone were familiar with printf, Bruce, I think you're right. :) > I've been trying to learn about it this morning and know that I can > change decimal numbers to octal or hex or any combination of that. I > found that I can make pretty tables and center text, but I could find no > examples of how to use it in the way you described. What kind of > "strategic places" were you thinking and in what context? In the source, add something like: printf( "After executing foo\n" ); at places and recompile. Then test and see if you get that output. If not then back up. Sometimes I just use printf( "\n" );, , , etc in the code. Note that the same thing can be done easier in gdb using stepping and preakpoints, but that's a bit difficult in this environment. If you are not familiar with C and have trouble understanding the code, this may not be the method that works for you. -- Bruce -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: [lfs-support] Getting in Chapter 5 [SOLVED][RESURRECTED]
On 10/14/2013 10:18 AM, Bruce Dubbs wrote: > Dan McGhee wrote: >> On 10/13/2013 11:02 PM, Bruce Dubbs wrote: >>> Drew Ames wrote: On 10/13/2013 06:48 PM, Dan McGhee wrote: > I got to chroot and the copied su from shadow in Ch 5 didn't work. I > can find no reason that it didn't. What I want to do now is compile it > in chroot environment and install only it there. Just in case I missed > some kind of linking. That seems unlikely, but ldd /tools/bin/su > (on the copied version) provided: >> linux-vdso.so.1 (0x79b38000) >> libcrypt.so.1 => /tools/lib/libcrypt.so.1 (0x7f20fb668000) >> libc.so.6 => /tools/lib/libc.so.6 (0x7f20fb2b8000) >> /tools/lib64/ld-linux-x86-64.so.2 (0x7f20fb8a) > as did ldd on my DESTDIR install, so it looks like everything is there. > > >> Dan, Bruce, and Ken, I've been following this thread with interest. I'm into my fourth LFS build, using LFS 7.4. For my previous three builds, I successfully use the package user hint without any problems. Now I'm facing the same issues as Dan. I tried building su from an old source at this link, starting at line 802: http://wiki.linuxfromscratch.org/hints/browser/trunk/PREVIOUS_FORMAT/more_control_and_pkg_man.txt?rev=904 I built it with GCC at the end of chapter 5 (I typed 'gcc -o su su.c'), then copied it to /tools/bin. When I got to chapter 6, as the root user in the chroot environment, that copy of su would not switch users to the linux-libc-headers user I created for the first package. I got the error: bash: /tools/bin/su: No such file or directory I then copied su from the host system and got the same results. Dan, when you say that su didn't work for you. Did you get an error message? >>> I don't know, but I wonder if the problem is the lack of passwd, group, >>> shadow, etc files. You need to track the source to find out. Just add >>> printf statements at strategic places. >> Bruce, I think your on to something. Thank goodness for this list. Many >> times I can get into a "thinking rut" when I'm troubleshooting. Fresh >> minds really help. >> >> I'm thinking that the previous version of su supplied with coreutils was >> a "stand alone" binary. The versions supplied now by shadow and >> util-linux depend on "auxiliary stuff" as you mentioned; i.e., we don't >> install su from util-linux because it depends on pam, which we don't >> use. Shadow, I think, integrally supplies the monitoring that pam does. >> When I examined shadow's "configure --help" this AM, I found this: >> >>> --enable-shadowgrp enable shadow group support [default=yes] >>> ... >>> --enable-account-tools-setuid >>> Install the user and group management tools setuid >>> and authenticate the callers. This requires >>> --with-pam. >> Additionally, shadow tracks the number of logins, failed logins and all >> that other stuff. But I don't know how few of these additional files are >> needed to run it. >> >> If someone were familiar with printf, Bruce, I think you're right. :) >> I've been trying to learn about it this morning and know that I can >> change decimal numbers to octal or hex or any combination of that. I >> found that I can make pretty tables and center text, but I could find no >> examples of how to use it in the way you described. What kind of >> "strategic places" were you thinking and in what context? > In the source, add something like: > > printf( "After executing foo\n" ); > > at places and recompile. Then test and see if you get that output. If > not then back up. Sometimes I just use printf( "\n" );, , , > etc in the code. Note that the same thing can be done easier in gdb > using stepping and preakpoints, but that's a bit difficult in this > environment. > > If you are not familiar with C and have trouble understanding the code, > this may not be the method that works for you. > > -- Bruce Therin lies the rub, Bruce. For many things in LFS, I know enough to ask semi-relevant questions, but the only thing I know about C is that it exists. Sounds like a project for one of those long, midwest winter nights when the north wind is howling at about 25 knots during a blizzard, and I have my hands wrapped around a piping mug of tea with honey and lemon. But for the topic at hand. I couldn't get su to work from a DESTDIR install even after I configured it in the DESTDIR--in chroot environment. Look like a "regular" install of shadow is in order. For purposes of the hint, assuming success with this step, I'll use the "nuke the build" option and see if I can get shadow to work at the end of Ch. 5. Depending on which one succeeds, I will recommend updating the hint accordingly. Thanks for the help. Dan -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the abo
Re: [lfs-support] Possible Syntax Error in Current "Package User" Hint Build Script[RESOLVED]
On 10/12/2013 11:27 AM, Dan McGhee wrote: > I'm melding my build script to the current one from this hint. I've > found a possible syntax error and want to see if my thinking is > correct. Since I've been monitoring this list closely again, i.e.; the > last three weeks, I've not seen anyone who has had a problem running > this script. But I think that few people build this way. :) > > Here is the line in question: > > cd "$HOME/xxxbuild/yyysrc" && srcdir="$(pwd)" || exit 1 > > > If <&&> and <||> are logical operators, shouldn't the whole command be > enclosed in double brackets, > [[ command1 && command2 || command3 ]]? The other syntax I know would be > [ command1 -a command2 -o command3 ]. > > Of course, this is all predicated on the use of <&&> and <||> as logical > operators. But if they're not, I don't understand the command. > > Comments? Answers? Recommendations? Rants? > > Thanks, > Dan > I ran this script for two different packages in Ch. 6 and it behaved flawlessly. Apparently Ken Moffat was right when he commented that the syntax function of gedit might be confused. Thanks to all who responded. This was a good learning and "memory refreshment" situation. Speaking of learning situations. I just learned to make sure that there's an "escape route" in scripts run by root. I wrote and ran a script to allow "follow-on" package users to write to directories created by an earlier user. (NOTE: This happens in the Package User hint.) I ran the script and forgot to pass an argument. I just hosed my LFS build. Oh well. I needed to test something else before Ch. 6 anyway. Thank goodness I backed up the tool chain. Dan -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
[lfs-support] Solid Red Block Cursor in TTY (Terminfo)
I'm trying to make my cursor a solid red block, like this: echo -e "\e[?16;0;200c" I've changed my terminfo variables cnorm, cvvis and rs1 like this: # Reconstructed via infocmp from file: /usr/share/terminfo/l/linux linux|linux console, am, bce, ccc, eo, mir, msgr, xenl, xon, colors#8, it#8, ncv#18, pairs#64, acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260i\316j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376, bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l\E[?1c, clear=\E[H\E[J, cnorm=\e[?16;0;200c, cr=^M, csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, cvvis=\e[?16;0;200c, dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, dl=\E[%p1%dM, dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K, flash=\E[?5h\E[?5l$<200/>, home=\E[H, hpa=\E[%i%p1%dG, ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=^J, initc=\E]P%p1%x%p2%{255}%*%{1000}%/%02x%p3%{255}%*%{1000}%/%02x%p4%{255}%*%{1000}%/%02x, kb2=\E[G, kbs=\177, kcbt=\E[Z, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~, kend=\E[4~, kf1=\E[[A, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, kf2=\E[[B, kf20=\E[34~, kf3=\E[[C, kf4=\E[[D, kf5=\E[[E, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, khome=\E[1~, kich1=\E[2~, kmous=\E[M, knp=\E[6~, kpp=\E[5~, kspd=^Z, nel=^M^J, oc=\E]R, op=\E[39;49m, rc=\E8, rev=\E[7m, ri=\EM, rmacs=\E[10m, rmam=\E[?7l, rmir=\E[4l, rmpch=\E[10m, rmso=\E[27m, rmul=\E[24m, rs1=\e[?16;0;200c, sc=\E7, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p5%t;2%;%?%p6%t;1%;%?%p7%t;8%;%?%p9%t;11%;m, sgr0=\E[0;10m, smacs=\E[11m, smam=\E[?7h, smir=\E[4h, smpch=\E[11m, smso=\E[7m, smul=\E[4m, tbc=\E[3g, u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?6c, u9=\E[c, vpa=\E[%i%p1%dd, I've compiled the terminfo with: tic , which puts the compiled terminfo in ~/.terminfo My problem is that this doesn't seem to be read, cause I manually have to do echo -e "\e[?16;0;200c" to get that red block cursor. The reason I'm trying to change this in the TTY is because after launching emacs, the cursor disappears completely and I have to reset the terminal. When I reset the terminal, I get a normal underscore blinking cursor again and I have to issue the command again. Any pointers as to what I can try? -- Esben Stien is b0ef@e s a http://www. s tn m irc://irc. b - i . e/%23contact sip:b0ef@ e e jid:b0ef@n n -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: [lfs-support] Getting in Chapter 5 [SOLVED][UNRESURRECTED]
On 10/14/2013 10:40 AM, Dan McGhee wrote: > But for the topic at hand. I couldn't get su to work from a DESTDIR > install even after I configured it in the DESTDIR--in chroot > environment. Look like a "regular" install of shadow is in order. For > purposes of the hint, assuming success with this step, I'll use the > "nuke the build" option and see if I can get shadow to work at the end > of Ch. 5. Depending on which one succeeds, I will recommend updating > the hint accordingly. Thanks for the help. Dan I've tested four different ways to provide su before starting to build the linux headers in Ch. 6. 1. compile shadow and cp su to /tools/bin in Ch. 5 2. install shadow at the end of Ch. 5 as lfs and not root. 3. compile shadow as root in the chroot environment and copy su to /tools/bin 4. install shadow as root before building the headers in Ch. 6 The only one that worked for me is the last one. The only thing I didn't do was configure shadow after installation, and su still worked. I'll configure it when shadow is installed in the course of going through Ch. 6. So, I think this process needs to be added to the hint. One of the reasons I like Package Users is that it's really easy to completely remove the files installed by a package. Installing shadow as root this way eliminates that and I don't know that shadow will over write it's files when installing as a package user when originally it was installed as root. That's something I'll be watching for as I make my way through. This might be the time to mention a trick I learned with find. Using "-newer" and "! -newer" in a find command can bracket those files installed by one package. You can create a time window that's only two minutes wide. I haven't tested the seconds. Thanks to all who responded in this thread. Dan -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
[lfs-support] Vim Early in Ch. 6
I'm getting lazy in my old age and want to edit files while I'm working my way through Ch. 6. Package users employs a build.conf in each users home directory. The options for configure, make and install are entered here--along with other options. To make this a little easier I'd like to use Vim right away in Ch. 6. The section on it didn't have any dependency info. Will I be screwing anything up or making my build harder if I install it before I get started? Dan -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: [lfs-support] Vim Early in Ch. 6
Dan McGhee wrote: > I'm getting lazy in my old age and want to edit files while I'm working > my way through Ch. 6. Package users employs a build.conf in each users > home directory. The options for configure, make and install are entered > here--along with other options. To make this a little easier I'd like > to use Vim right away in Ch. 6. The section on it didn't have any > dependency info. Will I be screwing anything up or making my build > harder if I install it before I get started? Just build vim at the end of chapter 5. ./configure --prefix=/tools make make install After you create the main directories, create /etc/vimrc according to taste. -- Bruce -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: [lfs-support] Vim Early in Ch. 6
On 10/14/2013 08:08 PM, Bruce Dubbs wrote: > Dan McGhee wrote: >> I'm getting lazy in my old age and want to edit files while I'm working >> my way through Ch. 6. Package users employs a build.conf in each users >> home directory. The options for configure, make and install are entered >> here--along with other options. To make this a little easier I'd like >> to use Vim right away in Ch. 6. The section on it didn't have any >> dependency info. Will I be screwing anything up or making my build >> harder if I install it before I get started? > Just build vim at the end of chapter 5. > > ./configure --prefix=/tools > make > make install > > After you create the main directories, create /etc/vimrc according to taste. > > -- Bruce > > Thanks, Bruce -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: [lfs-support] Vim Early in Ch. 6
On Oct 14, 2013, at 8:08 PM, Bruce Dubbs wrote: > ./configure --prefix=/tools > make > make install Should probably also include this: echo '#define SYS_VIMRC_FILE "/tools/etc/vimrc"' >> src/feature.h There have been many threads in the past throughout the various LFS versions even before 5.1.1 to add an editor in ch5, but the LFS devs never found it useful, although I have, and others have, too. Some of us do require an editor in ch6. Sed isn't that great, cat is okay with more as a pager before less isbuilt. But when you have text like this: "It is a good idea to visually inspect the specs file to verify the intended change was actually made." when adjusting the toolchain, it's much easier in a text editor. Either way, users have a pager which can be used, not ideal if a need to edit. If someone wants a full set of tools to build a complete final system, an editor is required, even if the build commands don't use it. But, don't see an editor in ch5 any time soon. Although, if you want to learn how to use sed and gawk, go for it! Learn how to edit without an editor! Cause the LFS devs are hardcore! Sincerely, William Harrington -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
[lfs-support] 7.2 chapter 5.7. Glibc-2.18 no makefile
Followed the instructions in 5.7. when I run make from the glib-build directory I get this: fs@lfshost /mnt/lfs/sources/glibc-build $ make make: *** No targets specified and no makefile found. Stop. What am I doing wrong? Please help. Bob S. -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: [lfs-support] 7.2 chapter 5.7. Glibc-2.18 no makefile
On Oct 14, 2013, at 9:52 PM, Robert Sissick wrote: > fs@lfshost /mnt/lfs/sources/glibc-build $ make > make: *** No targets specified and no makefile found. Stop. Configure didn't finish and there is no Makefile. Find out why configure didn't complete. Sincerely, William Harrington -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page