Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue when trying to build custom deb packages using latest release branch #1879

Closed
ssahu2021 opened this issue Jul 8, 2022 · 9 comments
Closed
Labels
is:question Issue is actually a question.

Comments

@ssahu2021
Copy link

ssahu2021 commented Jul 8, 2022

HI,
I'm trying to generate the custom deb packages for bionic(ubuntu 18.04.5) (with custom option)using tag/v2.0.194 branch, make build-deb target is not generating, using the following steps:

Dependent packages installed
sudo apt-get install -y libcmocka-dev shunit2 expect valgrind uncrustify doxygen graphviz cmake libpcre2-dev

git clone https://github.com/CESNET/libyang.git
cd libyang
git checkout v2.0.194
mkdir build; cd build
cmake ..
make build-deb

But this is not working and I'm getting an error :
make build-deb
make: *** No rule to make target 'build-deb'

root@62a0a4ebe395:/opt/frr/libyang/build# git branch
* (HEAD detached at v2.0.194)
  master
root@62a0a4ebe395:/opt/frr/libyang/build# cmake ..
-- The C compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found CMocka: /usr/lib/x86_64-linux-gnu/libcmocka.so (Required is at least version "1.0.1")
-- Could NOT find Uncrustify: Found unsuitable version "0.66.1_f", but required is at least "0.71" (found /usr/bin/uncrustify)
-- Looking for vdprintf
-- Looking for vdprintf - found
-- Looking for asprintf
-- Looking for asprintf - found
-- Looking for vasprintf
-- Looking for vasprintf - found
-- Looking for getline
-- Looking for getline - found
-- Looking for strndup
-- Looking for strndup - found
-- Looking for strnstr
-- Looking for strnstr - not found
-- Looking for strdupa
-- Looking for strdupa - found
-- Looking for strchrnul
-- Looking for strchrnul - found
-- Looking for get_current_dir_name
-- Looking for get_current_dir_name - found
-- Looking for pthread_mutex_timedlock
-- Looking for pthread_mutex_timedlock - found
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Looking for stdatomic.h
-- Looking for stdatomic.h - found
-- Performing Test HAVE_TM_GMTOFF
-- Performing Test HAVE_TM_GMTOFF - Success
-- Looking for timezone
-- Looking for timezone - found
-- Looking for realpath
-- Looking for realpath - found
-- Looking for localtime_r
-- Looking for localtime_r - found
-- Looking for gmtime_r
-- Looking for gmtime_r - found
-- Looking for strptime
-- Looking for strptime - found
-- Looking for mmap
-- Looking for mmap - found
-- Looking for dirname
-- Looking for dirname - found
-- Looking for setenv
-- Looking for setenv - found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found PCRE2: /usr/lib/x86_64-linux-gnu/libpcre2-8.so (found suitable version "10.31", minimum required is "10.21")
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.13") found components:  doxygen dot
-- Configuring done
-- Generating done
-- Build files have been written to: /opt/frr/libyang/build
root@62a0a4ebe395:/opt/frr/libyang/build# make build-deb
make: *** No rule to make target 'build-deb'.  Stop.
@jktjkt
Copy link
Contributor

jktjkt commented Jul 8, 2022

Build instructions for Debian are here, and I don't see make build-deb listed there. What instructions are you following?

@ssahu2021
Copy link
Author

@jktjkt Do you mean the below steps, which works only with debian/master branch, But we want to compile and generate the latest release branch V2.0.194, Please suggest

Building straight off git


Just the normal:

git clone https://github.com/CESNET/libyang -b debian/master
cd libyang
dpkg-buildpackage

Building a Debian .dsc

Again, pretty much the normal:

git clone https://github.com/CESNET/libyang -b debian/master
wget -Olibyang_0.16.105.orig.tar.gz https://github.com/CESNET/libyang/archive/v0.16-r3.tar.gz
cd libyang
dpkg-source -b .

@ssahu2021
Copy link
Author

@jktjkt I am getting below error,When i try to use debian/master branch

root@s390x-frr:~# git clone https://github.com/CESNET/libyang -b debian/master
Cloning into 'libyang'...
remote: Enumerating objects: 61154, done.
remote: Counting objects: 100% (800/800), done.
remote: Compressing objects: 100% (287/287), done.
remote: Total 61154 (delta 511), reused 785 (delta 503), pack-reused 60354
Receiving objects: 100% (61154/61154), 41.90 MiB | 8.72 MiB/s, done.
Resolving deltas: 100% (46006/46006), done.
root@s390x-frr:~# cd libyang/
root@s390x-frr:~/libyang# dpkg-buildpackage
dpkg-buildpackage: info: source package libyang
dpkg-buildpackage: info: source version 1.0.225-1
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Ondřej Surý <[email protected]>
dpkg-buildpackage: info: host architecture s390x
 dpkg-source --before-build libyang
dpkg-source: info: applying 0001-pybuild
dpkg-source: info: applying 0002-swigpy37
 debian/rules clean
dh clean
   dh_auto_clean
   dh_clean
 dpkg-source -b libyang
dpkg-source: error: can't build with source format '3.0 (quilt)': no upstream tarball found at ../libyang_1.0.225.orig.tar.{bz2,gz,lzma,xz}
dpkg-buildpackage: error: dpkg-source -b libyang subprocess returned exit status 255
root@s390x-frr:~/libyang#

@jktjkt
Copy link
Contributor

jktjkt commented Jul 11, 2022

It looks like @oerdnj did some work on this, see the lybiang2-debian-packaging branch. I have no idea how fresh that one is, or what amount of packaging scripts the maintainers want to keep updated in the repo.

But I'm still wondering where did that make build-deb come from?

@ssahu2021
Copy link
Author

@oerdnj Can you please help here to generate the custom debian packages for S390x machine using the latest Release tag (v2.0.194)

@ssahu2021
Copy link
Author

@jktjkt I have got it from #1278 those compilation steps

@ssahu2021
Copy link
Author

@jktjkt @oerdnj As suggested , able to generate the debian packages using lybiang2-debian-packaging branch. have below queries

  1. How to generate for latest release tag i,e v2.0.194
  2. Some error with secret key
dpkg-buildpackage: info: binary and diff upload (original source NOT included)
 signfile libyang2_2.0.112-6.dsc
gpg: keybox '/root/.gnupg/pubring.kbx' created
gpg: skipped "Ondřej Surý <[email protected]>": No secret key
gpg: dpkg-sign.MqWJcAoI/libyang2_2.0.112-6.dsc: clear-sign failed: No secret key

dpkg-buildpackage: error: failed to sign .dsc file

@jktjkt
Copy link
Contributor

jktjkt commented Jul 12, 2022

Looks like you forgot to update the changelog; in that case I think that the Debian's packaging infra is trying to get a "signature from [email protected]" because his entry is the last one in the changelog, and that one obviously cannot make. I don't know whether these signatures are mandatory, but anyway, that would be outside of scope of this project.

@michalvasko
Copy link
Member

Debian package scripts are still not final but they are perfectly fine for building your own packages. However, we are now using apkg for creating them, so you first need to download it using pip install apkg, it is just a small multi-platform useful app for building packages. Then, just run apkg build in the libyang repository, the package will automatically be built, just tested master on Ubuntu 22.04.

@michalvasko michalvasko added the is:question Issue is actually a question. label Jul 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is:question Issue is actually a question.
Projects
None yet
Development

No branches or pull requests

3 participants