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

Unable to init bootstrap from linux OS #564

Open
thochra opened this issue Mar 31, 2018 · 3 comments
Open

Unable to init bootstrap from linux OS #564

thochra opened this issue Mar 31, 2018 · 3 comments

Comments

@thochra
Copy link

thochra commented Mar 31, 2018

Hello there.

I'm trying to build some packages with pkgsrc.
I was happy to see everything was working fine until I understood that instead of using the pkgsrc-2016Q4 from pkgsrc repo I had to use the joyent/release/2016Q4 from pkgsrc-legacy repos to get all updates.

My problem here is I got stuck with the bootstrap.
It complains with that message Binary packages not supported during bootstrap => https://github.com/joyent/pkgsrc-legacy/blob/f6760ab5a4616e0845515ed737727db7d6dfb766/pkgtools/pkg_install/files/info/perform.c#L342.

Trying to dig in the commits did not helped me (I also don't know much about pkgsrc for now).
I have no idea how to fix this, so expect someone can give a hint for that.

My OS is archlinux, kernel 4.14.24-1-lts.

Here is the docker file I used to init my packages builder image:

FROM debian:9-slim

# Defines pkgsrc version
ARG PKG_VERSION

RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
    DEBIAN_FRONTEND=noninteractive apt-get -y upgrade && \
    DEBIAN_FRONTEND=noninteractive apt-get -y autoremove && \
    DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential git

ENV SH /bin/bash
ENV PATH $PATH:/usr/pkg/bin:/usr/pkg/sbin
ENV PKG_VERSION $PKG_VERSION
ENV PKG_BOOTSTRAP_ARCHIVE pkgsrc-bootstrap-x86_64-$PKG_VERSION.tar.gz
ENV PKGSRC_PATH /data/pkgsrc

# Fix for pkgsrc fetch error Unsupported URL scheme `https' (see xz source fetching fix below)
# This blocks https sources fetching which are not anymore in the main BSD ftp repos
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y curl
ENV FETCH_CMD=curl

# Init pkgsrc and pkgin
RUN mkdir -p /data && \
    cd /data && \
    git clone --depth 1 -b joyent/release/$PKG_VERSION https://github.com/joyent/pkgsrc-legacy.git pkgsrc
    #  && \
    # Fix missing source code
    # sed -i 's~http://tukaani.org/xz/~https://github.com/xz-mirror/xz/releases/download/v5.2.2/~' $PKGSRC_PATH/archivers/xz/Makefile && \
    # # Now continue with common procedure
    # cd $PKGSRC_PATH/bootstrap && \
    # ./bootstrap && \
    # cd $PKGSRC_PATH/pkgtools/pkgin && \
    # bmake && \
    # bmake install

# docker build --build-arg PKG_VERSION=2016Q4 -t pkgsrc:2016Q4-release .
# docker run -it --rm pkgsrc:2016Q4-release bash
# cd /data/pkgsrc/bootstrap && ./bootstrap

Eventually do not take care of the xz sources fix I made, I did it for the pkgsrc-2016Q4 from pkgsrc repo and I wasn't able to check for the pkgsrc-legacy repo.

Thanks in advance,
Thomas.

@mguegan
Copy link

mguegan commented Apr 4, 2018

Hi,
I can confirm the same result.
After investigation it seems the culprit is the following commit :
7f2ba52#diff-53f6ebd732875a7c23723b84c1fc0ed6
By reverting it, you can compile the bootstrap with this Dockerfile.

@jperkin I think this is not only happening on 2016Q4 but also on pkgsrc/2017Q4

@jperkin
Copy link
Collaborator

jperkin commented Apr 4, 2018

Nice catch, this is indeed the culprit. I don't notice this, I think because I have a working pkg_info in $PATH (though it shouldn't be using it), but was able to reproduce with a stripped $PATH.

My diff to fix this will be:

-       ${PKG_INFO} -X ${PKGFILE} >${.TARGET}
+       ${PKG_INFO} -X ${PKGFILE} >${.TARGET} 2>/dev/null || ${TRUE}

which isn't perfect but there's no good way of detecting that we're running in bootstrap mode at the moment.

@thochra
Copy link
Author

thochra commented Apr 4, 2018

Thank you for the patch guys !
Bootstrap is working now 😍

jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Apr 4, 2018
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue May 18, 2018
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue May 25, 2018
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Jun 11, 2018
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Jun 19, 2018
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Jun 25, 2018
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Jun 29, 2018
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Jul 2, 2018
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Jul 2, 2018
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Jul 12, 2018
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Sep 5, 2018
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Sep 20, 2018
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Sep 20, 2018
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Sep 28, 2018
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Sep 30, 2018
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Sep 30, 2018
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Oct 15, 2018
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Oct 24, 2018
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Nov 15, 2018
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Dec 31, 2018
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Jan 2, 2019
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Jan 15, 2019
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Apr 1, 2019
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Apr 1, 2019
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Jul 1, 2019
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Jul 1, 2019
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Oct 8, 2019
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Oct 8, 2019
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Oct 25, 2019
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Jan 2, 2020
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Jan 2, 2020
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Jan 16, 2020
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Jan 27, 2020
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Mar 30, 2020
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Mar 30, 2020
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Apr 7, 2020
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Apr 7, 2020
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue May 27, 2020
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Jun 25, 2020
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Jul 3, 2020
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Sep 28, 2020
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Oct 12, 2020
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Jan 4, 2021
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Jan 14, 2021
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Oct 12, 2021
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Oct 15, 2021
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Nov 29, 2021
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Nov 29, 2021
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Jan 4, 2022
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Jan 4, 2022
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Feb 3, 2022
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue May 9, 2022
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Jun 29, 2022
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this issue Aug 4, 2022
Resolves issues when bootstrapping without a suitable pkg_info
available, as the bootstrap pkg_info is unable to operate on binary
packages.  Fixes TritonDataCenter/pkgsrc-legacy#564
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants