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

docker: Fix build for Alpine Linux after the recent changes since 9.1 #15457

Merged
merged 7 commits into from
Mar 12, 2024

Conversation

ton31337
Copy link
Member

No description provided.

@ton31337 ton31337 added this to the 10.0 milestone Feb 29, 2024
@ton31337
Copy link
Member Author

@Mergifyio backport dev/10.0

Copy link

mergify bot commented Feb 29, 2024

backport dev/10.0

🟠 Waiting for conditions to match

  • merged [📌 backport requirement]

@github-actions github-actions bot added size/M and removed size/S labels Feb 29, 2024
@ton31337 ton31337 force-pushed the fix/docker_builds_for_10.0 branch from 16d24c7 to f71668c Compare February 29, 2024 13:21
@github-actions github-actions bot added size/S and removed size/M labels Feb 29, 2024
Copy link

mergify bot commented Mar 4, 2024

backport dev/10.0

✅ Backports have been created

@riw777 riw777 self-requested a review March 5, 2024 13:43
@riw777
Copy link
Member

riw777 commented Mar 5, 2024

I think this is still work in progress (?) ...

@ton31337
Copy link
Member Author

ton31337 commented Mar 5, 2024

Nope, it's ready to be merged.

@donaldsharp donaldsharp self-requested a review March 5, 2024 16:36
include/linux/mroute.h Outdated Show resolved Hide resolved
ton31337 added 7 commits March 9, 2024 09:33
This is happening for Alpine Linux.

```
26 64.59 ./lib/sigevent.h:23:18: error: unknown type name 'sig_atomic_t'
26 64.59    23 |         volatile sig_atomic_t caught; /* private member   */
26 64.59       |                  ^~~~~~~~~~~~
26 64.60 In file included from ./lib/libfrr.h:12,
26 64.60                  from ./lib/vty.h:28,
26 64.60                  from ./lib/command.h:11,
26 64.60                  from ./lib/debug.h:11,
26 64.60                  from ./mgmtd/mgmt.h:12,
26 64.60                  from mgmtd/mgmt_history.c:14:
26 64.60 ./lib/sigevent.h:23:18: error: unknown type name 'sig_atomic_t'
26 64.60    23 |         volatile sig_atomic_t caught; /* private member   */
26 64.60       |                  ^~~~~~~~~~~~
```

Signed-off-by: Donatas Abraitis <[email protected]>
Fixing compilation for Alpine Linux:

```
25 91.59 vtysh/vtysh_main.c: In function 'vtysh_flock_config':
25 91.59 vtysh/vtysh_main.c:276:20: warning: implicit declaration of function 'open'; did you mean 'popen'? [-Wimplicit-function-declaration]
25 91.59   276 |         flock_fd = open(flock_file, O_RDONLY, 0644);
25 91.59       |                    ^~~~
25 91.59       |                    popen
25 91.60 vtysh/vtysh_main.c:276:37: error: 'O_RDONLY' undeclared (first use in this function)
25 91.60   276 |         flock_fd = open(flock_file, O_RDONLY, 0644);
25 91.60       |                                     ^~~~~~~~
25 91.60 vtysh/vtysh_main.c:276:37: note: each undeclared identifier is reported only once for each function it appears in
25 91.60   CC       zebra/if_netlink.o
25 91.61 vtysh/vtysh_main.c: In function 'main':
25 91.61 vtysh/vtysh_main.c:637:49: error: 'O_CREAT' undeclared (first use in this function)
25 91.61   637 |                         fp = open(history_file, O_CREAT | O_EXCL,
25 91.61       |                                                 ^~~~~~~
25 91.62 vtysh/vtysh_main.c:637:59: error: 'O_EXCL' undeclared (first use in this function)
25 91.62   637 |                         fp = open(history_file, O_CREAT | O_EXCL,
25 91.62       |                                                           ^~~~~~
```

Signed-off-by: Donatas Abraitis <[email protected]>
Alpine Linux gets this with 3.19:

This is already installed with `pytest` via apk package manager.

```
15 78.20 error: externally-managed-environment
15 78.20
15 78.20 × This environment is externally managed
15 78.20 ╰─>
15 78.20     The system-wide python installation should be maintained using the system
15 78.20     package manager (apk) only.
15 78.20
15 78.20     If the package in question is not packaged already (and hence installable via
15 78.20     "apk add py3-somepackage"), please consider installing it inside a virtual
15 78.20     environment, e.g.:
15 78.20
15 78.20     python3 -m venv /path/to/venv
15 78.20     . /path/to/venv/bin/activate
15 78.20     pip install mypackage
15 78.20
15 78.20     To exit the virtual environment, run:
15 78.20
15 78.20     deactivate
15 78.20
15 78.20     The virtual environment is not deleted, and can be re-entered by re-sourcing
15 78.20     the activate file.
15 78.20
15 78.20     To automatically manage virtual environments, consider using pipx (from the
15 78.20     pipx package).
15 78.20
15 78.20 note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
```

Signed-off-by: Donatas Abraitis <[email protected]>
It was using a wrong sysdir.

```
--------------------
  72 |     # Own the config / PID files
  73 |     RUN mkdir -p /var/run/frr
  74 | >>> RUN chown -R frr:frr /etc/frr /var/run/frr
  75 |
  76 |     # Simple init manager for reaping processes and forwarding signals
--------------------
```

Signed-off-by: Donatas Abraitis <[email protected]>
Not needed anymore since FRRouting@a538915.

Signed-off-by: Donatas Abraitis <[email protected]>
@ton31337 ton31337 force-pushed the fix/docker_builds_for_10.0 branch from f71668c to a201559 Compare March 9, 2024 08:27
@github-actions github-actions bot added the size/L label Mar 9, 2024
@github-actions github-actions bot removed the size/S label Mar 9, 2024
@ton31337 ton31337 requested a review from donaldsharp March 10, 2024 15:47
@riw777 riw777 merged commit dfa2776 into FRRouting:master Mar 12, 2024
9 checks passed
ton31337 added a commit that referenced this pull request Mar 13, 2024
docker: Fix build for Alpine Linux after the recent changes since 9.1 (backport #15457)
@ton31337 ton31337 deleted the fix/docker_builds_for_10.0 branch August 3, 2024 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants