WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: how can i use lldpctl and lldpd and lldpcli command in tincore version14  (Read 711 times)

Offline yimding

  • Newbie
  • *
  • Posts: 7
hello
i need to use lldpctl and lldpcli and lldpd command in my tinycore system, but i can not see tcz package in http://tinycorelinux.net/14.x/x86_64/tcz/

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14756
Are these commands from lldpd?

Offline yimding

  • Newbie
  • *
  • Posts: 7
yes, but i can not find lldpd package in tcz url

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14756
If you know how, you could try compiling it yourself?

Offline yimding

  • Newbie
  • *
  • Posts: 7
you mean tinycore don't have lldpd packages, if i want to use lldpctl command, i must complie source code ?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11518
Hi yimding
I just checked the repos. Tinycore has never had a lldpd package.

Offline CentralWare

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 747
@Rich: Care to do the honors?
Take your FindMagic script and name it /usr/local/bin/magic
Code: [Select]
#!/bin/sh
CUR=$(pwd)
clear

EXTS="compiletc bc squashfs-tools"
for EXT in $EXTS
do
    EXT=${EXT/.tcz/}
    [ ! -f /etc/sysconfig/tcedir/optional/${EXT}.tcz ] && tce-load -w $EXT
    [ ! -d /tmp/tcloop/${EXT} ] && tce-load -i $EXT
done

[ -d lldp_all ] && rm lldp_* -fR
[ ! -f lldpd-1.0.18.tar.gz ] && wget https://media.luffy.cx/files/lldpd/lldpd-1.0.18.tar.gz
[ ! -d lldpd-1.0.18 ] && tar -zxf lldpd-1.0.18.tar.gz

cd lldpd-1.0.18; mkdir build; cd build
[ ! -f ../.configured ] && ../configure --prefix=/usr/local --localstatedir=/var --sysconfdir=/usr/local/etc --with-embedded-libevent --without-snmp && touch ../.configured
make -j 9
make DESTDIR=/tmp/lldp install
mv /tmp/lldp $CUR/lldp_all

mkdir -p $CUR/lldp_ext/usr/local \
         $CUR/lldp_doc/usr/local/share \
         $CUR/lldp_dev/usr/local

# DEV
mv $CUR/lldp_all/usr/local/include $CUR/lldp_dev/usr/local/
# DOC
mv $CUR/lldp_all/usr/local/share/doc $CUR/lldp_doc/usr/local/share/
mv $CUR/lldp_all/usr/local/share/man $CUR/lldp_doc/usr/local/share/
# EXT
mv $CUR/lldp_all/usr/local/* $CUR/lldp_ext/usr/local/

# STRIP Binaries
touch $CUR/.deps; rm $CUR/.deps -f
cd $CUR/lldp_ext
find -type f | magic | grep ELF | awk '{print $2}' > /tmp/bins
for file in $(cat /tmp/bins)
do
    strip -s ${file}
    ldd ${file} >> $CUR/.deps
done
rm /tmp/bins -f

# Create TCZs
cd $CUR
mksquashfs lldp_ext lldp.tcz >/dev/null 2>&1
mksquashfs lldp_doc lldp-doc.tcz >/dev/null 2>&1
mksquashfs lldp_dev lldp-dev.tcz >/dev/null 2>&1

cat > lldp.tcz.dep << "EOF"
readline
ncursesw
EOF
Feel free to add generic flags to taste! :)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11518
Hi CentralWare
I'll take care of it this evening.

Offline CentralWare

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 747
I'll take care of it this evening.
@Rich: 'Knew you were the man for the job!  LOL, plus, you've got keys to make it happen! :)
As noted, I didn't tune the compiler for any given platforms as I was aiming at completion and integrity.
It'll still need md5 and info/tree files, but most everything else should be laid out.  Thank you, sir!
Please also upload tcz/src to the appropriate platforms if you would.

@yimding: This means you're the "Beta Tester!"  Please be sure to come back here afterward and leave comments of successes and/or failures!  (Building a project is one thing...  knowing at least one person out there who is knowledgeable of what it is supposed to do has actually done it...  that's the important part to me.)  Additionally, you'll want to set your "Mirror" back to http://repo.tinycorelinux.net/ if you changed it, as that's the only place that you'll find "new" release files when they first get uploaded.  ( /opt/tcemirror )

@Rich @Curaga @Paul_123 @Juanito: I'd recommend looking into the new hosting service versus the other mirrors being able to stop by and get updates as I don't think files are being mirrored anymore.  (ie: repo.tinycorelinux.net/15/86/tcz shows a recent project called boinc.tcz as being on the server, but the file does not exist at ibiblio's mirror and the file has been on the repo server for quite some time now.)  This may be intentional due to the index page created that's home to platform/tcz, I'm not sure, thus why I bring it up - assuming you don't WANT 15.x to mirror out.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11027
ibiblio had done an update and its new ssh keys needed accepting. Syncs happening again.
The only barriers that can stop you are the ones you create yourself.

Offline CentralWare

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 747
Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
« Reply #10 on: August 14, 2024, 08:54:07 AM »
@curaga: Thanks!  I didn't know it was just Ibiblio that was caught up on syncs.

Question: Is there a purpose behind the static index page on 15.x/(platform)/tcz ?  (ie: no links, just a file listing)
I'm guessing it's to prevent spidering/mirroring/etc., and IF SO, is this because of 15.x being beta-like or is this the new preferred method for releases?
(...or it could be because a static file listing is a lot faster to load!? :) )

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11027
Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
« Reply #11 on: August 14, 2024, 09:23:22 AM »
It's because generating the listings uses a ton of CPU for large dirs like these. Apache/nginx/etc dirlistings all take a ton of resources. So to be considerate for other mirrors, and to keep the load light on ours, it's pregenerated. As for why a plain text listing and not a HTML, that's both size and to discourage manually downloading extensions.

edit: Not specific to 15.x, it's been like this for all versions for a long time.
The only barriers that can stop you are the ones you create yourself.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11518
Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
« Reply #12 on: August 14, 2024, 02:15:04 PM »
Hi CentralWare
lldpd added to tc14 x86_64 repository.
Build script and source tarball are here:
http://tinycorelinux.net/14.x/x86_64/tcz/src/lldpd/

I'll PM yimding to see if he comes back.

Offline CentralWare

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 747
Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
« Reply #13 on: August 14, 2024, 07:07:53 PM »
@Rich: Thank you, kind sir! :)