Skip to content

Commit

Permalink
bareos: Fix build on SunOS.
Browse files Browse the repository at this point in the history
Remove ONLY_FOR_PLATFORM.  We don't deliberately break platforms just because
they haven't been tested.  Fix PKG_SHELL to use ${SH}, there is no guarantee
that /bin/sh is the right shell on all platforms.

There are some other cleanups necessary in this package (e.g. bsd.pkg.mk is
included way too early), but they can wait for the 22.0.1 update.
  • Loading branch information
jperkin committed Jan 13, 2023
1 parent 489bbb5 commit d96f168
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 15 deletions.
6 changes: 3 additions & 3 deletions sysutils/bareos/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.14 2022/11/23 16:21:03 adam Exp $
# $NetBSD: Makefile,v 1.15 2023/01/13 11:50:37 jperkin Exp $

CONFLICTS= bareos-clientonly-[0-9]* bacula-clientonly-[0-9]* bacula-[0-9]*

Expand All @@ -15,12 +15,12 @@ BUILD_DEFS+= VARBASE
BAREOS_SD_USER?= bareossd
PKG_GECOS.${BAREOS_SD_USER}= Bareos Storage User
PKG_HOME.${BAREOS_SD_USER}= ${BAREOS_WORKINGDIR}
PKG_SHELL.${BAREOS_SD_USER}= /bin/sh
PKG_SHELL.${BAREOS_SD_USER}= ${SH}

BAREOS_DIR_USER?= bareosdir
PKG_GECOS.${BAREOS_DIR_USER}= Bareos Director User
PKG_HOME.${BAREOS_DIR_USER}= ${BAREOS_WORKINGDIR}
PKG_SHELL.${BAREOS_DIR_USER}= /bin/sh
PKG_SHELL.${BAREOS_DIR_USER}= ${SH}

PKG_USERS= ${BAREOS_DIR_USER}:${BAREOS_GROUP} ${BAREOS_SD_USER}:${BAREOS_GROUP}

Expand Down
5 changes: 1 addition & 4 deletions sysutils/bareos/Makefile.common
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: Makefile.common,v 1.5 2021/08/11 10:24:05 kardel Exp $
# $NetBSD: Makefile.common,v 1.6 2023/01/13 11:50:37 jperkin Exp $
# used by sysutils/bareos-clientonly/Makefile

GITHUB_PROJECT= bareos
Expand All @@ -15,9 +15,6 @@ MAINTAINER= kardel@NetBSD.org
HOMEPAGE= http://www.bareos.org/
LICENSE= gnu-agpl-v3

# pkgsrc version currently only tested/configured for NetBSD build
ONLY_FOR_PLATFORM= NetBSD-*-*

USE_LANGUAGES+= c c++
USE_CMAKE= yes
CMAKE_ARG_PATH= ..
Expand Down
4 changes: 2 additions & 2 deletions sysutils/bareos/distinfo
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
$NetBSD: distinfo,v 1.8 2021/10/26 11:19:21 nia Exp $
$NetBSD: distinfo,v 1.9 2023/01/13 11:50:37 jperkin Exp $

BLAKE2s (bareos-20.0.2.tar.gz) = ea4d3094c2a07fbf84eb5182d203257787f4111756e8400b8a0e7f9e39aaf8ae
SHA512 (bareos-20.0.2.tar.gz) = f3a0f481a2c9b3a422f4db3e094587c97fe10e2ea5e7a8ba44e9971b0a11746ae4ad598ea469d5c8ec0dfb962e4104c00931397905aebbf3e22af49834043994
Size (bareos-20.0.2.tar.gz) = 13333946 bytes
SHA1 (patch-core_CMakeLists.txt) = e59c94620769db0b26d6255830753bdc3b42ad77
SHA1 (patch-core_cmake_BareosCheckIncludes.cmake) = bb3703ee083b3aa6ea8d5819c0064324037c560a
SHA1 (patch-core_cmake_BareosFindAllLibraries.cmake) = 35ddd7c2f95f56aa5f65c5f6f2d39700c350e492
SHA1 (patch-core_cmake_BareosFindAllLibraries.cmake) = 9b05eddc9db34ef2473e1c9746f6e48cd5afde8e
SHA1 (patch-core_cmake_BareosFindPrograms.cmake) = 89172bc64ba28ca901c3fb5f150f814c0e063875
SHA1 (patch-core_cmake_BareosInstallConfigFiles.cmake) = a0110766eee99c19bda4de506a86b29a74032e8d
SHA1 (patch-core_cmake_BareosSetVariableDefaults.cmake) = 1dcdfb5a1a3b6494bb101b4b810646d58bfeb662
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
$NetBSD: patch-core_cmake_BareosFindAllLibraries.cmake,v 1.2 2021/02/01 09:08:43 kardel Exp $
$NetBSD: patch-core_cmake_BareosFindAllLibraries.cmake,v 1.3 2023/01/13 11:50:37 jperkin Exp $

cmake build gets confused when both versions of python 2 and 3 are
availabe. as python 2.7 is eol prefer python 3 in this case.
Prefer python3, remove broken SunOS section.

--- core/cmake/BareosFindAllLibraries.cmake.orig 2020-12-16 07:46:16.000000000 +0000
--- core/cmake/BareosFindAllLibraries.cmake.orig 2021-06-10 15:37:18.000000000 +0000
+++ core/cmake/BareosFindAllLibraries.cmake
@@ -44,7 +44,7 @@ else()
@@ -30,12 +30,6 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Windows
set(Python3_FOUND 1)
set(Python3_EXT_SUFFIX ".pyd")
- # Python Plugins currently cannot be built for Solaris
-elseif(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
- set(HAVE_PYTHON 0)
- set(Python2_FOUND 0)
- set(Python3_FOUND 0)
-
else()
find_package(Python2 COMPONENTS Interpreter Development)
find_package(Python3 COMPONENTS Interpreter Development)
@@ -54,7 +48,7 @@ else()
set(HAVE_PYTHON 1)
endif()
Expand All @@ -14,7 +26,7 @@ $NetBSD: patch-core_cmake_BareosFindAllLibraries.cmake,v 1.2 2021/02/01 09:08:43
set(PYTHON_EXECUTABLE
${Python2_EXECUTABLE}
PARENT_SCOPE
@@ -62,6 +62,7 @@ else()
@@ -72,6 +66,7 @@ else()
endif()
if(${Python3_FOUND})
Expand Down

0 comments on commit d96f168

Please sign in to comment.