Pisi version upgrade. Removed some unnecessary files from kernel package.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,18 +0,0 @@
|
||||
--- a/Makefile.orig 2019-11-25 03:32:01.000000000 +0300
|
||||
+++ b/Makefile 2019-12-11 03:20:12.876664698 +0300
|
||||
@@ -509,15 +509,6 @@
|
||||
# ignore whole output directory
|
||||
outputmakefile:
|
||||
ifdef building_out_of_srctree
|
||||
- $(Q)if [ -f $(srctree)/.config -o \
|
||||
- -d $(srctree)/include/config -o \
|
||||
- -d $(srctree)/arch/$(SRCARCH)/include/generated ]; then \
|
||||
- echo >&2 "***"; \
|
||||
- echo >&2 "*** The source tree is not clean, please run 'make$(if $(findstring command line, $(origin ARCH)), ARCH=$(ARCH)) mrproper'"; \
|
||||
- echo >&2 "*** in $(abs_srctree)";\
|
||||
- echo >&2 "***"; \
|
||||
- false; \
|
||||
- fi
|
||||
$(Q)ln -fsn $(srctree) source
|
||||
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile $(srctree)
|
||||
$(Q)test -e .gitignore || \
|
||||
@@ -1,780 +0,0 @@
|
||||
--- a/Makefile.orig 2019-11-25 03:32:01.000000000 +0300
|
||||
+++ b/Makefile 2019-12-11 16:59:26.708807035 +0300
|
||||
@@ -3,7 +3,7 @@
|
||||
PATCHLEVEL = 4
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION =
|
||||
-NAME = Kleptomaniac Octopus
|
||||
+NAME = Bobtail Squid
|
||||
|
||||
# *DOCUMENTATION*
|
||||
# To see a list of typical targets execute "make help"
|
||||
@@ -206,16 +206,30 @@
|
||||
KBUILD_CHECKSRC = 0
|
||||
endif
|
||||
|
||||
-# Use make M=dir or set the environment variable KBUILD_EXTMOD to specify the
|
||||
-# directory of external module to build. Setting M= takes precedence.
|
||||
+# Use make M=dir to specify directory of external module to build
|
||||
+# Old syntax make ... SUBDIRS=$PWD is still supported
|
||||
+# Setting the environment variable KBUILD_EXTMOD take precedence
|
||||
+ifdef SUBDIRS
|
||||
+ $(warning ================= WARNING ================)
|
||||
+ $(warning 'SUBDIRS' will be removed after Linux 5.3)
|
||||
+ $(warning )
|
||||
+ $(warning If you are building an individual subdirectory)
|
||||
+ $(warning in the kernel tree, you can do like this:)
|
||||
+ $(warning $$ make path/to/dir/you/want/to/build/)
|
||||
+ $(warning (Do not forget the trailing slash))
|
||||
+ $(warning )
|
||||
+ $(warning If you are building an external module,)
|
||||
+ $(warning Please use 'M=' or 'KBUILD_EXTMOD' instead)
|
||||
+ $(warning ==========================================)
|
||||
+ KBUILD_EXTMOD ?= $(SUBDIRS)
|
||||
+endif
|
||||
+
|
||||
ifeq ("$(origin M)", "command line")
|
||||
KBUILD_EXTMOD := $(M)
|
||||
endif
|
||||
|
||||
export KBUILD_CHECKSRC KBUILD_EXTMOD
|
||||
|
||||
-extmod-prefix = $(if $(KBUILD_EXTMOD),$(KBUILD_EXTMOD)/)
|
||||
-
|
||||
ifeq ($(abs_srctree),$(abs_objtree))
|
||||
# building in the source tree
|
||||
srctree := .
|
||||
@@ -257,62 +271,52 @@
|
||||
%asm-generic kernelversion %src-pkg
|
||||
no-sync-config-targets := $(no-dot-config-targets) install %install \
|
||||
kernelrelease
|
||||
-single-targets := %.a %.i %.ko %.lds %.ll %.lst %.mod %.o %.s %.symtypes %/
|
||||
|
||||
-config-build :=
|
||||
-mixed-build :=
|
||||
-need-config := 1
|
||||
-may-sync-config := 1
|
||||
-single-build :=
|
||||
+config-targets := 0
|
||||
+mixed-targets := 0
|
||||
+dot-config := 1
|
||||
+may-sync-config := 1
|
||||
|
||||
ifneq ($(filter $(no-dot-config-targets), $(MAKECMDGOALS)),)
|
||||
ifeq ($(filter-out $(no-dot-config-targets), $(MAKECMDGOALS)),)
|
||||
- need-config :=
|
||||
+ dot-config := 0
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(filter $(no-sync-config-targets), $(MAKECMDGOALS)),)
|
||||
ifeq ($(filter-out $(no-sync-config-targets), $(MAKECMDGOALS)),)
|
||||
- may-sync-config :=
|
||||
+ may-sync-config := 0
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(KBUILD_EXTMOD),)
|
||||
- may-sync-config :=
|
||||
+ may-sync-config := 0
|
||||
endif
|
||||
|
||||
ifeq ($(KBUILD_EXTMOD),)
|
||||
ifneq ($(filter config %config,$(MAKECMDGOALS)),)
|
||||
- config-build := 1
|
||||
+ config-targets := 1
|
||||
ifneq ($(words $(MAKECMDGOALS)),1)
|
||||
- mixed-build := 1
|
||||
+ mixed-targets := 1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
-# We cannot build single targets and the others at the same time
|
||||
-ifneq ($(filter $(single-targets), $(MAKECMDGOALS)),)
|
||||
- single-build := 1
|
||||
- ifneq ($(filter-out $(single-targets), $(MAKECMDGOALS)),)
|
||||
- mixed-build := 1
|
||||
- endif
|
||||
-endif
|
||||
-
|
||||
# For "make -j clean all", "make -j mrproper defconfig all", etc.
|
||||
ifneq ($(filter $(clean-targets),$(MAKECMDGOALS)),)
|
||||
ifneq ($(filter-out $(clean-targets),$(MAKECMDGOALS)),)
|
||||
- mixed-build := 1
|
||||
+ mixed-targets := 1
|
||||
endif
|
||||
endif
|
||||
|
||||
# install and modules_install need also be processed one by one
|
||||
ifneq ($(filter install,$(MAKECMDGOALS)),)
|
||||
ifneq ($(filter modules_install,$(MAKECMDGOALS)),)
|
||||
- mixed-build := 1
|
||||
+ mixed-targets := 1
|
||||
endif
|
||||
endif
|
||||
|
||||
-ifdef mixed-build
|
||||
+ifeq ($(mixed-targets),1)
|
||||
# ===========================================================================
|
||||
# We're called with mixed targets (*config and build targets).
|
||||
# Handle them one by one.
|
||||
@@ -328,7 +332,7 @@
|
||||
$(MAKE) -f $(srctree)/Makefile $$i; \
|
||||
done
|
||||
|
||||
-else # !mixed-build
|
||||
+else
|
||||
|
||||
include scripts/Kbuild.include
|
||||
|
||||
@@ -388,7 +392,9 @@
|
||||
export KCONFIG_CONFIG
|
||||
|
||||
# SHELL used by kbuild
|
||||
-CONFIG_SHELL := sh
|
||||
+CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
|
||||
+ else if [ -x /bin/bash ]; then echo /bin/bash; \
|
||||
+ else echo sh; fi ; fi)
|
||||
|
||||
HOST_LFS_CFLAGS := $(shell getconf LFS_CFLAGS 2>/dev/null)
|
||||
HOST_LFS_LDFLAGS := $(shell getconf LFS_LDFLAGS 2>/dev/null)
|
||||
@@ -425,7 +431,6 @@
|
||||
PYTHON2 = python2
|
||||
PYTHON3 = python3
|
||||
CHECK = sparse
|
||||
-BASH = bash
|
||||
|
||||
CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
|
||||
-Wbitwise -Wno-return-void -Wno-unknown-attribute $(CF)
|
||||
@@ -465,13 +470,12 @@
|
||||
KBUILD_CFLAGS_KERNEL :=
|
||||
KBUILD_AFLAGS_MODULE := -DMODULE
|
||||
KBUILD_CFLAGS_MODULE := -DMODULE
|
||||
-KBUILD_LDFLAGS_MODULE :=
|
||||
-export KBUILD_LDS_MODULE := $(srctree)/scripts/module-common.lds
|
||||
+KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds
|
||||
KBUILD_LDFLAGS :=
|
||||
GCC_PLUGINS_CFLAGS :=
|
||||
CLANG_FLAGS :=
|
||||
|
||||
-export ARCH SRCARCH CONFIG_SHELL BASH HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE AS LD CC
|
||||
+export ARCH SRCARCH CONFIG_SHELL HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE AS LD CC
|
||||
export CPP AR NM STRIP OBJCOPY OBJDUMP OBJSIZE PAHOLE LEX YACC AWK INSTALLKERNEL
|
||||
export PERL PYTHON PYTHON2 PYTHON3 CHECK CHECKFLAGS MAKE UTS_MACHINE HOSTCXX
|
||||
export KBUILD_HOSTCXXFLAGS KBUILD_HOSTLDFLAGS KBUILD_HOSTLDLIBS LDFLAGS_MODULE
|
||||
@@ -482,6 +486,7 @@
|
||||
export KBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE
|
||||
export KBUILD_AFLAGS_MODULE KBUILD_CFLAGS_MODULE KBUILD_LDFLAGS_MODULE
|
||||
export KBUILD_AFLAGS_KERNEL KBUILD_CFLAGS_KERNEL
|
||||
+export KBUILD_ARFLAGS
|
||||
|
||||
# Files to ignore in find ... statements
|
||||
|
||||
@@ -501,7 +506,6 @@
|
||||
$(Q)rm -f .tmp_quiet_recordmcount
|
||||
|
||||
PHONY += outputmakefile
|
||||
-# Before starting out-of-tree build, make sure the source tree is clean.
|
||||
# outputmakefile generates a Makefile in the output directory, if using a
|
||||
# separate output directory. This allows convenient use of make in the
|
||||
# output directory.
|
||||
@@ -509,15 +513,6 @@
|
||||
# ignore whole output directory
|
||||
outputmakefile:
|
||||
ifdef building_out_of_srctree
|
||||
- $(Q)if [ -f $(srctree)/.config -o \
|
||||
- -d $(srctree)/include/config -o \
|
||||
- -d $(srctree)/arch/$(SRCARCH)/include/generated ]; then \
|
||||
- echo >&2 "***"; \
|
||||
- echo >&2 "*** The source tree is not clean, please run 'make$(if $(findstring command line, $(origin ARCH)), ARCH=$(ARCH)) mrproper'"; \
|
||||
- echo >&2 "*** in $(abs_srctree)";\
|
||||
- echo >&2 "***"; \
|
||||
- false; \
|
||||
- fi
|
||||
$(Q)ln -fsn $(srctree) source
|
||||
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile $(srctree)
|
||||
$(Q)test -e .gitignore || \
|
||||
@@ -549,7 +544,7 @@
|
||||
# and from include/config/auto.conf.cmd to detect the compiler upgrade.
|
||||
CC_VERSION_TEXT = $(shell $(CC) --version 2>/dev/null | head -n 1)
|
||||
|
||||
-ifdef config-build
|
||||
+ifeq ($(config-targets),1)
|
||||
# ===========================================================================
|
||||
# *config targets only - make sure prerequisites are updated, and descend
|
||||
# in scripts/kconfig to make the *config target
|
||||
@@ -560,13 +555,13 @@
|
||||
include arch/$(SRCARCH)/Makefile
|
||||
export KBUILD_DEFCONFIG KBUILD_KCONFIG CC_VERSION_TEXT
|
||||
|
||||
-config: outputmakefile scripts_basic FORCE
|
||||
+config: scripts_basic outputmakefile FORCE
|
||||
$(Q)$(MAKE) $(build)=scripts/kconfig $@
|
||||
|
||||
-%config: outputmakefile scripts_basic FORCE
|
||||
+%config: scripts_basic outputmakefile FORCE
|
||||
$(Q)$(MAKE) $(build)=scripts/kconfig $@
|
||||
|
||||
-else #!config-build
|
||||
+else
|
||||
# ===========================================================================
|
||||
# Build targets only - this includes vmlinux, arch specific targets, clean
|
||||
# targets and others. In general all targets except *config targets.
|
||||
@@ -599,7 +594,7 @@
|
||||
# in addition to whatever we do anyway.
|
||||
# Just "make" or "make all" shall build modules as well
|
||||
|
||||
-ifneq ($(filter all _all modules nsdeps,$(MAKECMDGOALS)),)
|
||||
+ifneq ($(filter all _all modules,$(MAKECMDGOALS)),)
|
||||
KBUILD_MODULES := 1
|
||||
endif
|
||||
|
||||
@@ -609,7 +604,7 @@
|
||||
|
||||
export KBUILD_MODULES KBUILD_BUILTIN
|
||||
|
||||
-ifdef need-config
|
||||
+ifeq ($(dot-config),1)
|
||||
include include/config/auto.conf
|
||||
endif
|
||||
|
||||
@@ -650,10 +645,15 @@
|
||||
export RETPOLINE_CFLAGS
|
||||
export RETPOLINE_VDSO_CFLAGS
|
||||
|
||||
+# The arch Makefile can set ARCH_{CPP,A,C}FLAGS to override the default
|
||||
+# values of the respective KBUILD_* variables
|
||||
+ARCH_CPPFLAGS :=
|
||||
+ARCH_AFLAGS :=
|
||||
+ARCH_CFLAGS :=
|
||||
include arch/$(SRCARCH)/Makefile
|
||||
|
||||
-ifdef need-config
|
||||
-ifdef may-sync-config
|
||||
+ifeq ($(dot-config),1)
|
||||
+ifeq ($(may-sync-config),1)
|
||||
# Read in dependencies to all Kconfig* files, make sure to run syncconfig if
|
||||
# changes are detected. This should be included after arch/$(SRCARCH)/Makefile
|
||||
# because some architectures define CROSS_COMPILE there.
|
||||
@@ -676,7 +676,7 @@
|
||||
# The syncconfig should be executed only once to make all the targets.
|
||||
%/auto.conf %/auto.conf.cmd %/tristate.conf: $(KCONFIG_CONFIG)
|
||||
$(Q)$(MAKE) -f $(srctree)/Makefile syncconfig
|
||||
-else # !may-sync-config
|
||||
+else
|
||||
# External modules and some install targets need include/generated/autoconf.h
|
||||
# and include/config/auto.conf but do not care if they are up-to-date.
|
||||
# Use auto.conf to trigger the test
|
||||
@@ -692,7 +692,7 @@
|
||||
/bin/false)
|
||||
|
||||
endif # may-sync-config
|
||||
-endif # need-config
|
||||
+endif # $(dot-config)
|
||||
|
||||
KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks,)
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning,frame-address,)
|
||||
@@ -700,12 +700,10 @@
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning, format-overflow)
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member)
|
||||
|
||||
-ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE
|
||||
-KBUILD_CFLAGS += -O2
|
||||
-else ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3
|
||||
-KBUILD_CFLAGS += -O3
|
||||
-else ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
|
||||
-KBUILD_CFLAGS += -Os
|
||||
+ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
|
||||
+KBUILD_CFLAGS += -Os
|
||||
+else
|
||||
+KBUILD_CFLAGS += -O2
|
||||
endif
|
||||
|
||||
ifdef CONFIG_CC_DISABLE_WARN_MAYBE_UNINITIALIZED
|
||||
@@ -753,11 +751,6 @@
|
||||
# These warnings generated too much noise in a regular build.
|
||||
# Use make W=1 to enable them (see scripts/Makefile.extrawarn)
|
||||
KBUILD_CFLAGS += -Wno-unused-but-set-variable
|
||||
-
|
||||
-# Warn about unmarked fall-throughs in switch statement.
|
||||
-# Disabled for clang while comment to attribute conversion happens and
|
||||
-# https://github.com/ClangBuiltLinux/linux/issues/636 is discussed.
|
||||
-KBUILD_CFLAGS += $(call cc-option,-Wimplicit-fallthrough,)
|
||||
endif
|
||||
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning, unused-const-variable)
|
||||
@@ -852,6 +845,9 @@
|
||||
# warn about C99 declaration after statement
|
||||
KBUILD_CFLAGS += -Wdeclaration-after-statement
|
||||
|
||||
+# Warn about unmarked fall-throughs in switch statement.
|
||||
+KBUILD_CFLAGS += $(call cc-option,-Wimplicit-fallthrough,)
|
||||
+
|
||||
# Variable Length Arrays (VLAs) should not be used anywhere in the kernel
|
||||
KBUILD_CFLAGS += -Wvla
|
||||
|
||||
@@ -897,14 +893,18 @@
|
||||
KBUILD_CFLAGS += $(call cc-option,-fcf-protection=none)
|
||||
endif
|
||||
|
||||
+# use the deterministic mode of AR if available
|
||||
+KBUILD_ARFLAGS := $(call ar-option,D)
|
||||
+
|
||||
include scripts/Makefile.kasan
|
||||
include scripts/Makefile.extrawarn
|
||||
include scripts/Makefile.ubsan
|
||||
|
||||
-# Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments
|
||||
-KBUILD_CPPFLAGS += $(KCPPFLAGS)
|
||||
-KBUILD_AFLAGS += $(KAFLAGS)
|
||||
-KBUILD_CFLAGS += $(KCFLAGS)
|
||||
+# Add any arch overrides and user supplied CPPFLAGS, AFLAGS and CFLAGS as the
|
||||
+# last assignments
|
||||
+KBUILD_CPPFLAGS += $(ARCH_CPPFLAGS) $(KCPPFLAGS)
|
||||
+KBUILD_AFLAGS += $(ARCH_AFLAGS) $(KAFLAGS)
|
||||
+KBUILD_CFLAGS += $(ARCH_CFLAGS) $(KCFLAGS)
|
||||
|
||||
KBUILD_LDFLAGS_MODULE += --build-id
|
||||
LDFLAGS_vmlinux += --build-id
|
||||
@@ -913,13 +913,6 @@
|
||||
LDFLAGS_vmlinux += $(call ld-option, -X,)
|
||||
endif
|
||||
|
||||
-ifeq ($(CONFIG_RELR),y)
|
||||
-LDFLAGS_vmlinux += --pack-dyn-relocs=relr
|
||||
-endif
|
||||
-
|
||||
-# make the checker run with the right architecture
|
||||
-CHECKFLAGS += --arch=$(ARCH)
|
||||
-
|
||||
# insure the checker run with the right endianness
|
||||
CHECKFLAGS += $(if $(CONFIG_CPU_BIG_ENDIAN),-mbig-endian,-mlittle-endian)
|
||||
|
||||
@@ -1010,7 +1003,7 @@
|
||||
|
||||
PHONY += prepare0
|
||||
|
||||
-export MODORDER := $(extmod-prefix)modules.order
|
||||
+export MODORDER := $(if $(KBUILD_EXTMOD),$(KBUILD_EXTMOD)/)modules.order
|
||||
|
||||
ifeq ($(KBUILD_EXTMOD),)
|
||||
core-y += kernel/ certs/ mm/ fs/ ipc/ security/ crypto/ block/
|
||||
@@ -1023,9 +1016,6 @@
|
||||
$(patsubst %/,%,$(filter %/, $(init-) $(core-) \
|
||||
$(drivers-) $(net-) $(libs-) $(virt-))))
|
||||
|
||||
-build-dirs := $(vmlinux-dirs)
|
||||
-clean-dirs := $(vmlinux-alldirs)
|
||||
-
|
||||
init-y := $(patsubst %/, %/built-in.a, $(init-y))
|
||||
core-y := $(patsubst %/, %/built-in.a, $(core-y))
|
||||
drivers-y := $(patsubst %/, %/built-in.a, $(drivers-y))
|
||||
@@ -1040,7 +1030,7 @@
|
||||
export KBUILD_VMLINUX_LIBS := $(libs-y1)
|
||||
export KBUILD_LDS := arch/$(SRCARCH)/kernel/vmlinux.lds
|
||||
export LDFLAGS_vmlinux
|
||||
-# used by scripts/Makefile.package
|
||||
+# used by scripts/package/Makefile
|
||||
export KBUILD_ALLDIRS := $(sort $(filter-out arch/%,$(vmlinux-alldirs)) LICENSES arch include scripts tools)
|
||||
|
||||
vmlinux-deps := $(KBUILD_LDS) $(KBUILD_VMLINUX_OBJS) $(KBUILD_VMLINUX_LIBS)
|
||||
@@ -1048,7 +1038,7 @@
|
||||
# Recurse until adjust_autoksyms.sh is satisfied
|
||||
PHONY += autoksyms_recursive
|
||||
ifdef CONFIG_TRIM_UNUSED_KSYMS
|
||||
-autoksyms_recursive: descend modules.order
|
||||
+autoksyms_recursive: $(vmlinux-deps) modules.order
|
||||
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/adjust_autoksyms.sh \
|
||||
"$(MAKE) -f $(srctree)/Makefile vmlinux"
|
||||
endif
|
||||
@@ -1080,7 +1070,17 @@
|
||||
|
||||
# The actual objects are generated when descending,
|
||||
# make sure no implicit rule kicks in
|
||||
-$(sort $(vmlinux-deps)): descend ;
|
||||
+$(sort $(vmlinux-deps)): $(vmlinux-dirs) ;
|
||||
+
|
||||
+# Handle descending into subdirectories listed in $(vmlinux-dirs)
|
||||
+# Preset locale variables to speed up the build process. Limit locale
|
||||
+# tweaks to this spot to avoid wrong language settings when running
|
||||
+# make menuconfig etc.
|
||||
+# Error messages still appears in the original language
|
||||
+
|
||||
+PHONY += $(vmlinux-dirs)
|
||||
+$(vmlinux-dirs): prepare
|
||||
+ $(Q)$(MAKE) $(build)=$@ need-builtin=1 need-modorder=1
|
||||
|
||||
filechk_kernel.release = \
|
||||
echo "$(KERNELVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))"
|
||||
@@ -1102,9 +1102,24 @@
|
||||
# archprepare is used in arch Makefiles and when processed asm symlink,
|
||||
# version.h and scripts_basic is processed / created.
|
||||
|
||||
-PHONY += prepare archprepare
|
||||
+PHONY += prepare archprepare prepare3
|
||||
|
||||
-archprepare: outputmakefile archheaders archscripts scripts include/config/kernel.release \
|
||||
+# prepare3 is used to check if we are building in a separate output directory,
|
||||
+# and if so do:
|
||||
+# 1) Check that make has not been executed in the kernel src $(srctree)
|
||||
+prepare3: include/config/kernel.release
|
||||
+ifdef building_out_of_srctree
|
||||
+ @$(kecho) ' Using $(srctree) as source for kernel'
|
||||
+ $(Q)if [ -f $(srctree)/.config -o \
|
||||
+ -d $(srctree)/include/config -o \
|
||||
+ -d $(srctree)/arch/$(SRCARCH)/include/generated ]; then \
|
||||
+ echo >&2 " $(srctree) is not clean, please run 'make ARCH=$(ARCH) mrproper'"; \
|
||||
+ echo >&2 " in the '$(srctree)' directory.";\
|
||||
+ /bin/false; \
|
||||
+ fi;
|
||||
+endif
|
||||
+
|
||||
+archprepare: archheaders archscripts scripts prepare3 outputmakefile \
|
||||
asm-generic $(version_h) $(autoksyms_h) include/generated/utsrelease.h
|
||||
|
||||
prepare0: archprepare
|
||||
@@ -1220,15 +1235,16 @@
|
||||
kselftest:
|
||||
$(Q)$(MAKE) -C $(srctree)/tools/testing/selftests run_tests
|
||||
|
||||
-kselftest-%: FORCE
|
||||
- $(Q)$(MAKE) -C $(srctree)/tools/testing/selftests $*
|
||||
+PHONY += kselftest-clean
|
||||
+kselftest-clean:
|
||||
+ $(Q)$(MAKE) -C $(srctree)/tools/testing/selftests clean
|
||||
|
||||
PHONY += kselftest-merge
|
||||
kselftest-merge:
|
||||
$(if $(wildcard $(objtree)/.config),, $(error No .config exists, config your kernel first!))
|
||||
$(Q)find $(srctree)/tools/testing/selftests -name config | \
|
||||
xargs $(srctree)/scripts/kconfig/merge_config.sh -m $(objtree)/.config
|
||||
- $(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig
|
||||
+ +$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Devicetree files
|
||||
@@ -1239,11 +1255,11 @@
|
||||
|
||||
ifneq ($(dtstree),)
|
||||
|
||||
-%.dtb: include/config/kernel.release scripts_dtc
|
||||
+%.dtb: prepare3 scripts_dtc
|
||||
$(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@
|
||||
|
||||
PHONY += dtbs dtbs_install dt_binding_check
|
||||
-dtbs dtbs_check: include/config/kernel.release scripts_dtc
|
||||
+dtbs dtbs_check: prepare3 scripts_dtc
|
||||
$(Q)$(MAKE) $(build)=$(dtstree)
|
||||
|
||||
dtbs_check: export CHECK_DTBS=1
|
||||
@@ -1282,16 +1298,17 @@
|
||||
|
||||
PHONY += modules
|
||||
modules: $(if $(KBUILD_BUILTIN),vmlinux) modules.order modules.builtin
|
||||
+ @$(kecho) ' Building modules, stage 2.';
|
||||
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
|
||||
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/modules-check.sh
|
||||
|
||||
-modules.order: descend
|
||||
- $(Q)$(AWK) '!x[$$0]++' $(addsuffix /$@, $(build-dirs)) > $@
|
||||
+modules.order: $(vmlinux-dirs)
|
||||
+ $(Q)$(AWK) '!x[$$0]++' $(addsuffix /$@, $(vmlinux-dirs)) > $@
|
||||
|
||||
-modbuiltin-dirs := $(addprefix _modbuiltin_, $(build-dirs))
|
||||
+modbuiltin-dirs := $(addprefix _modbuiltin_, $(vmlinux-dirs))
|
||||
|
||||
modules.builtin: $(modbuiltin-dirs)
|
||||
- $(Q)$(AWK) '!x[$$0]++' $(addsuffix /$@, $(build-dirs)) > $@
|
||||
+ $(Q)$(AWK) '!x[$$0]++' $(addsuffix /$@, $(vmlinux-dirs)) > $@
|
||||
|
||||
PHONY += $(modbuiltin-dirs)
|
||||
# tristate.conf is not included from this Makefile. Add it as a prerequisite
|
||||
@@ -1364,14 +1381,12 @@
|
||||
|
||||
# Directories & files removed with 'make mrproper'
|
||||
MRPROPER_DIRS += include/config include/generated \
|
||||
- arch/$(SRCARCH)/include/generated .tmp_objdiff \
|
||||
- debian/ snap/ tar-install/
|
||||
+ arch/$(SRCARCH)/include/generated .tmp_objdiff
|
||||
MRPROPER_FILES += .config .config.old .version \
|
||||
Module.symvers \
|
||||
signing_key.pem signing_key.priv signing_key.x509 \
|
||||
x509.genkey extra_certificates signing_key.x509.keyid \
|
||||
- signing_key.x509.signer vmlinux-gdb.py \
|
||||
- *.spec
|
||||
+ signing_key.x509.signer vmlinux-gdb.py
|
||||
|
||||
# Directories & files removed with 'make distclean'
|
||||
DISTCLEAN_DIRS +=
|
||||
@@ -1381,8 +1396,11 @@
|
||||
#
|
||||
clean: rm-dirs := $(CLEAN_DIRS)
|
||||
clean: rm-files := $(CLEAN_FILES)
|
||||
+clean-dirs := $(addprefix _clean_, . $(vmlinux-alldirs))
|
||||
|
||||
-PHONY += archclean vmlinuxclean
|
||||
+PHONY += $(clean-dirs) clean archclean vmlinuxclean
|
||||
+$(clean-dirs):
|
||||
+ $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@)
|
||||
|
||||
vmlinuxclean:
|
||||
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/link-vmlinux.sh clean
|
||||
@@ -1423,11 +1441,13 @@
|
||||
|
||||
# Packaging of the kernel to various formats
|
||||
# ---------------------------------------------------------------------------
|
||||
+package-dir := scripts/package
|
||||
|
||||
%src-pkg: FORCE
|
||||
- $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.package $@
|
||||
+ $(Q)$(MAKE) $(build)=$(package-dir) $@
|
||||
%pkg: include/config/kernel.release FORCE
|
||||
- $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.package $@
|
||||
+ $(Q)$(MAKE) $(build)=$(package-dir) $@
|
||||
+
|
||||
|
||||
# Brief documentation of the typical targets used
|
||||
# ---------------------------------------------------------------------------
|
||||
@@ -1480,9 +1500,6 @@
|
||||
@echo ' headerdep - Detect inclusion cycles in headers'
|
||||
@echo ' coccicheck - Check with Coccinelle'
|
||||
@echo ''
|
||||
- @echo 'Tools:'
|
||||
- @echo ' nsdeps - Generate missing symbol namespace dependencies'
|
||||
- @echo ''
|
||||
@echo 'Kernel selftest:'
|
||||
@echo ' kselftest - Build and run kernel selftest (run as root)'
|
||||
@echo ' Build, install, and boot kernel before'
|
||||
@@ -1493,10 +1510,8 @@
|
||||
@echo ''
|
||||
@$(if $(dtstree), \
|
||||
echo 'Devicetree:'; \
|
||||
- echo '* dtbs - Build device tree blobs for enabled boards'; \
|
||||
- echo ' dtbs_install - Install dtbs to $(INSTALL_DTBS_PATH)'; \
|
||||
- echo ' dt_binding_check - Validate device tree binding documents'; \
|
||||
- echo ' dtbs_check - Validate device tree source files';\
|
||||
+ echo '* dtbs - Build device tree blobs for enabled boards'; \
|
||||
+ echo ' dtbs_install - Install dtbs to $(INSTALL_DTBS_PATH)'; \
|
||||
echo '')
|
||||
|
||||
@echo 'Userspace tools targets:'
|
||||
@@ -1504,7 +1519,7 @@
|
||||
@echo ' or "cd tools; make help"'
|
||||
@echo ''
|
||||
@echo 'Kernel packaging:'
|
||||
- @$(MAKE) -f $(srctree)/scripts/Makefile.package help
|
||||
+ @$(MAKE) $(build)=$(package-dir) help
|
||||
@echo ''
|
||||
@echo 'Documentation targets:'
|
||||
@$(MAKE) -f $(srctree)/Documentation/Makefile dochelp
|
||||
@@ -1529,7 +1544,7 @@
|
||||
@echo ' make C=1 [targets] Check re-compiled c source with $$CHECK (sparse by default)'
|
||||
@echo ' make C=2 [targets] Force check of all c source with $$CHECK'
|
||||
@echo ' make RECORDMCOUNT_WARN=1 [targets] Warn about ignored mcount sections'
|
||||
- @echo ' make W=n [targets] Enable extra build checks, n=1,2,3 where'
|
||||
+ @echo ' make W=n [targets] Enable extra gcc checks, n=1,2,3 where'
|
||||
@echo ' 1: warnings which may be relevant and do not occur too often'
|
||||
@echo ' 2: warnings which occur quite often but may still be relevant'
|
||||
@echo ' 3: more obscure warnings, can most likely be ignored'
|
||||
@@ -1558,7 +1573,7 @@
|
||||
DOC_TARGETS := xmldocs latexdocs pdfdocs htmldocs epubdocs cleandocs \
|
||||
linkcheckdocs dochelp refcheckdocs
|
||||
PHONY += $(DOC_TARGETS)
|
||||
-$(DOC_TARGETS):
|
||||
+$(DOC_TARGETS): scripts_basic FORCE
|
||||
$(Q)$(MAKE) $(build)=Documentation $@
|
||||
|
||||
# Misc
|
||||
@@ -1603,9 +1618,13 @@
|
||||
echo " is missing; modules will have no dependencies and modversions."; \
|
||||
echo )
|
||||
|
||||
-build-dirs := $(KBUILD_EXTMOD)
|
||||
-PHONY += modules
|
||||
-modules: descend $(objtree)/Module.symvers
|
||||
+module-dirs := $(addprefix _module_,$(KBUILD_EXTMOD))
|
||||
+PHONY += $(module-dirs) modules
|
||||
+$(module-dirs): prepare $(objtree)/Module.symvers
|
||||
+ $(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@) need-modorder=1
|
||||
+
|
||||
+modules: $(module-dirs)
|
||||
+ @$(kecho) ' Building modules, stage 2.';
|
||||
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
|
||||
|
||||
PHONY += modules_install
|
||||
@@ -1621,12 +1640,13 @@
|
||||
_emodinst_post: _emodinst_
|
||||
$(call cmd,depmod)
|
||||
|
||||
-clean-dirs := $(KBUILD_EXTMOD)
|
||||
-clean: rm-files := $(KBUILD_EXTMOD)/Module.symvers
|
||||
+clean-dirs := $(addprefix _clean_,$(KBUILD_EXTMOD))
|
||||
|
||||
-PHONY += /
|
||||
-/:
|
||||
- @echo >&2 '"$(MAKE) /" is no longer supported. Please use "$(MAKE) ./" instead.'
|
||||
+PHONY += $(clean-dirs) clean
|
||||
+$(clean-dirs):
|
||||
+ $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@)
|
||||
+
|
||||
+clean: rm-files := $(KBUILD_EXTMOD)/Module.symvers
|
||||
|
||||
PHONY += help
|
||||
help:
|
||||
@@ -1641,21 +1661,6 @@
|
||||
PHONY += prepare
|
||||
endif # KBUILD_EXTMOD
|
||||
|
||||
-# Handle descending into subdirectories listed in $(build-dirs)
|
||||
-# Preset locale variables to speed up the build process. Limit locale
|
||||
-# tweaks to this spot to avoid wrong language settings when running
|
||||
-# make menuconfig etc.
|
||||
-# Error messages still appears in the original language
|
||||
-PHONY += descend $(build-dirs)
|
||||
-descend: $(build-dirs)
|
||||
-$(build-dirs): prepare
|
||||
- $(Q)$(MAKE) $(build)=$@ single-build=$(single-build) need-builtin=1 need-modorder=1
|
||||
-
|
||||
-clean-dirs := $(addprefix _clean_, $(clean-dirs))
|
||||
-PHONY += $(clean-dirs) clean
|
||||
-$(clean-dirs):
|
||||
- $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@)
|
||||
-
|
||||
clean: $(clean-dirs)
|
||||
$(call cmd,rmdirs)
|
||||
$(call cmd,rmfiles)
|
||||
@@ -1664,7 +1669,7 @@
|
||||
-o -name '*.ko.*' \
|
||||
-o -name '*.dtb' -o -name '*.dtb.S' -o -name '*.dt.yaml' \
|
||||
-o -name '*.dwo' -o -name '*.lst' \
|
||||
- -o -name '*.su' -o -name '*.mod' -o -name '*.ns_deps' \
|
||||
+ -o -name '*.su' -o -name '*.mod' \
|
||||
-o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \
|
||||
-o -name '*.lex.c' -o -name '*.tab.[ch]' \
|
||||
-o -name '*.asn1.[ch]' \
|
||||
@@ -1677,20 +1682,11 @@
|
||||
# Generate tags for editors
|
||||
# ---------------------------------------------------------------------------
|
||||
quiet_cmd_tags = GEN $@
|
||||
- cmd_tags = $(BASH) $(srctree)/scripts/tags.sh $@
|
||||
+ cmd_tags = $(CONFIG_SHELL) $(srctree)/scripts/tags.sh $@
|
||||
|
||||
tags TAGS cscope gtags: FORCE
|
||||
$(call cmd,tags)
|
||||
|
||||
-# Script to generate missing namespace dependencies
|
||||
-# ---------------------------------------------------------------------------
|
||||
-
|
||||
-PHONY += nsdeps
|
||||
-
|
||||
-nsdeps: modules
|
||||
- $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost nsdeps
|
||||
- $(Q)$(CONFIG_SHELL) $(srctree)/scripts/$@
|
||||
-
|
||||
# Scripts to check various things for consistency
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
@@ -1707,7 +1703,7 @@
|
||||
| xargs $(PERL) -w $(srctree)/scripts/checkversion.pl
|
||||
|
||||
coccicheck:
|
||||
- $(Q)$(BASH) $(srctree)/scripts/$@
|
||||
+ $(Q)$(CONFIG_SHELL) $(srctree)/scripts/$@
|
||||
|
||||
namespacecheck:
|
||||
$(PERL) $(srctree)/scripts/namespace.pl
|
||||
@@ -1755,47 +1751,45 @@
|
||||
|
||||
# Single targets
|
||||
# ---------------------------------------------------------------------------
|
||||
-# To build individual files in subdirectories, you can do like this:
|
||||
-#
|
||||
-# make foo/bar/baz.s
|
||||
-#
|
||||
-# The supported suffixes for single-target are listed in 'single-targets'
|
||||
-#
|
||||
-# To build only under specific subdirectories, you can do like this:
|
||||
-#
|
||||
-# make foo/bar/baz/
|
||||
-
|
||||
-ifdef single-build
|
||||
-
|
||||
-single-all := $(filter $(single-targets), $(MAKECMDGOALS))
|
||||
-
|
||||
-# .ko is special because modpost is needed
|
||||
-single-ko := $(sort $(filter %.ko, $(single-all)))
|
||||
-single-no-ko := $(sort $(patsubst %.ko,%.mod, $(single-all)))
|
||||
-
|
||||
-$(single-ko): single_modpost
|
||||
- @:
|
||||
-$(single-no-ko): descend
|
||||
- @:
|
||||
-
|
||||
+# Single targets are compatible with:
|
||||
+# - build with mixed source and output
|
||||
+# - build with separate output dir 'make O=...'
|
||||
+# - external modules
|
||||
+#
|
||||
+# target-dir => where to store outputfile
|
||||
+# build-dir => directory in kernel source tree to use
|
||||
+
|
||||
+build-target = $(if $(KBUILD_EXTMOD), $(KBUILD_EXTMOD)/)$@
|
||||
+build-dir = $(patsubst %/,%,$(dir $(build-target)))
|
||||
+
|
||||
+%.i: prepare FORCE
|
||||
+ $(Q)$(MAKE) $(build)=$(build-dir) $(build-target)
|
||||
+%.ll: prepare FORCE
|
||||
+ $(Q)$(MAKE) $(build)=$(build-dir) $(build-target)
|
||||
+%.lst: prepare FORCE
|
||||
+ $(Q)$(MAKE) $(build)=$(build-dir) $(build-target)
|
||||
+%.o: prepare FORCE
|
||||
+ $(Q)$(MAKE) $(build)=$(build-dir) $(build-target)
|
||||
+%.s: prepare FORCE
|
||||
+ $(Q)$(MAKE) $(build)=$(build-dir) $(build-target)
|
||||
+%.symtypes: prepare FORCE
|
||||
+ $(Q)$(MAKE) $(build)=$(build-dir) $(build-target)
|
||||
ifeq ($(KBUILD_EXTMOD),)
|
||||
-# For the single build of in-tree modules, use a temporary file to avoid
|
||||
+# For the single build of an in-tree module, use a temporary file to avoid
|
||||
# the situation of modules_install installing an invalid modules.order.
|
||||
-MODORDER := .modules.tmp
|
||||
+%.ko: MODORDER := .modules.tmp
|
||||
endif
|
||||
-
|
||||
-PHONY += single_modpost
|
||||
-single_modpost: $(single-no-ko)
|
||||
- $(Q){ $(foreach m, $(single-ko), echo $(extmod-prefix)$m;) } > $(MODORDER)
|
||||
+%.ko: prepare FORCE
|
||||
+ $(Q)$(MAKE) $(build)=$(build-dir) $(build-target:.ko=.mod)
|
||||
+ $(Q)echo $(build-target) > $(MODORDER)
|
||||
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
|
||||
|
||||
-KBUILD_MODULES := 1
|
||||
-
|
||||
-export KBUILD_SINGLE_TARGETS := $(addprefix $(extmod-prefix), $(single-no-ko))
|
||||
+# Modules
|
||||
+PHONY += /
|
||||
+/: ./
|
||||
|
||||
-single-build = $(if $(filter-out $@/, $(single-no-ko)),1)
|
||||
-
|
||||
-endif
|
||||
+%/: prepare FORCE
|
||||
+ $(Q)$(MAKE) KBUILD_MODULES=1 $(build)=$(build-dir) need-modorder=1
|
||||
|
||||
# FIXME Should go into a make.lib or something
|
||||
# ===========================================================================
|
||||
@@ -1816,9 +1810,9 @@
|
||||
|
||||
-include $(foreach f,$(existing-targets),$(dir $(f)).$(notdir $(f)).cmd)
|
||||
|
||||
-endif # config-targets
|
||||
-endif # mixed-build
|
||||
-endif # need-sub-make
|
||||
+endif # ifeq ($(config-targets),1)
|
||||
+endif # ifeq ($(mixed-targets),1)
|
||||
+endif # need-sub-make
|
||||
|
||||
PHONY += FORCE
|
||||
FORCE:
|
||||
@@ -14,7 +14,6 @@
|
||||
<Description>kernel contains the Linux kernel, the core of any Linux operating system. The kernel handles the basic functions of the operating system: memory allocation, process allocation, device input and output, etc.</Description>
|
||||
<Archive sha1sum="8fd0449a462c77f3e5b35848f4bf3c41411702d6" type="targz">https://mirrors.edge.kernel.org/pub/linux/kernel/v5.x/linux-5.4.tar.gz</Archive>
|
||||
<AdditionalFiles>
|
||||
<AdditionalFile target="configs/kernel-i686-config">configs/kernel-i686-config</AdditionalFile>
|
||||
<AdditionalFile target="configs/kernel-x86_64-config">configs/kernel-x86_64-config</AdditionalFile>
|
||||
<AdditionalFile permission="0755" target="generate-module-list">scripts/generate-module-list</AdditionalFile>
|
||||
</AdditionalFiles>
|
||||
@@ -43,7 +42,7 @@
|
||||
<!-- <Patch level="1">patches/mageia/disable-mrproper-in-devel-rpms.patch</Patch> -->
|
||||
|
||||
<!-- Build fix -->
|
||||
<Patch level="1">patches/pisilinux/revert-Makefile.patch</Patch>
|
||||
<!-- <Patch level="1">patches/pisilinux/revert-Makefile.patch</Patch>-->
|
||||
</Patches>
|
||||
</Source>
|
||||
|
||||
|
||||
@@ -8,27 +8,23 @@ from pisi.actionsapi import pisitools
|
||||
from pisi.actionsapi import shelltools
|
||||
from pisi.actionsapi import pythonmodules
|
||||
|
||||
|
||||
def build():
|
||||
pisitools.dosed("pisi/__init__.py", "2.4", "2.6.1")
|
||||
pisitools.dosed("pisi/db/lazydb.py", "2.4", "2.6.1")
|
||||
pythonmodules.compile()
|
||||
|
||||
|
||||
def install():
|
||||
# Install into /usr/lib/pardus so we can protect ourself from python updates
|
||||
pythonmodules.install("--install-lib=/usr/lib/pisilinux")
|
||||
|
||||
pisitools.dosym("pisi-cli", "/usr/bin/pisi")
|
||||
|
||||
shelltools.touch("LOCK")
|
||||
shelltools.chmod("LOCK", 0666)
|
||||
shelltools.chmod("LOCK", 0o666)
|
||||
pisitools.dodir("/run/lock/files.ldb")
|
||||
pisitools.insinto("/run/lock/files.ldb", "LOCK")
|
||||
pisitools.dodir("/var/lib/pisi/info/files.ldb")
|
||||
pisitools.dosym("/run/lock/files.ldb/LOCK", "/var/lib/pisi/info/files.ldb/LOCK")
|
||||
|
||||
|
||||
pisitools.insinto("/etc/pisi", "pisi.conf-%s" % get.ARCH(), "pisi.conf")
|
||||
|
||||
# we need it teporary
|
||||
# we need it temporary
|
||||
pisitools.dodir("/usr/lib/pardus")
|
||||
pisitools.dosym("/usr/lib/pisilinux/pisi", "/usr/lib/pardus/pisi")
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
diff -Nuar a/pisi/cli/emergeup.py b/pisi/cli/emergeup.py
|
||||
--- a/pisi/cli/emergeup.py 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ b/pisi/cli/emergeup.py 2016-06-06 23:33:48.000000000 +0300
|
||||
@@ -0,0 +1,82 @@
|
||||
+# -*- coding:utf-8 -*-
|
||||
+#
|
||||
+# Copyright (C) 2005 - 2007, TUBITAK/UEKAE
|
||||
+#
|
||||
+# This program is free software; you can redistribute it and/or modify it under
|
||||
+# the terms of the GNU General Public License as published by the Free
|
||||
+# Software Foundation; either version 2 of the License, or (at your option)
|
||||
+# any later version.
|
||||
+#
|
||||
+# Please read the COPYING file.
|
||||
+#
|
||||
+
|
||||
+import optparse
|
||||
+
|
||||
+import gettext
|
||||
+__trans = gettext.translation('pisi', fallback=True)
|
||||
+_ = __trans.ugettext
|
||||
+
|
||||
+import pisi.cli.command as command
|
||||
+import pisi.cli.build as build
|
||||
+import pisi.context as ctx
|
||||
+import pisi.api
|
||||
+
|
||||
+class EmergeUp(build.Build):
|
||||
+ __doc__ = _("""Build and install PiSi source packages from repository
|
||||
+
|
||||
+Usage: emergeup ...
|
||||
+
|
||||
+You should give the name of a source package to be
|
||||
+downloaded from a repository containing sources.
|
||||
+
|
||||
+You can also give the name of a component.
|
||||
+""")
|
||||
+ __metaclass__ = command.autocommand
|
||||
+
|
||||
+ def __init__(self, args):
|
||||
+ super(EmergeUp, self).__init__(args)
|
||||
+ self.comar = True
|
||||
+
|
||||
+ name = ("emergeup", "emup")
|
||||
+
|
||||
+ def options(self):
|
||||
+
|
||||
+ group = optparse.OptionGroup(self.parser, _("emergeup options"))
|
||||
+ super(EmergeUp, self).add_options(group)
|
||||
+ group.add_option("-c", "--component", action="store",
|
||||
+ default=None, help=_("Emerge available packages under given component"))
|
||||
+ group.add_option("--ignore-file-conflicts", action="store_true",
|
||||
+ default=False, help=_("Ignore file conflicts"))
|
||||
+ group.add_option("--ignore-package-conflicts", action="store_true",
|
||||
+ default=False, help=_("Ignore package conflicts"))
|
||||
+ group.add_option("--ignore-comar", action="store_true",
|
||||
+ default=False, help=_("Bypass comar configuration agent"))
|
||||
+ self.parser.add_option_group(group)
|
||||
+
|
||||
+ def run(self):
|
||||
+ self.init(database = True)
|
||||
+
|
||||
+ source = pisi.db.sourcedb.SourceDB()
|
||||
+
|
||||
+ imdb = pisi.db.installdb.InstallDB()
|
||||
+
|
||||
+ installed_emerge_packages = imdb.list_installed_with_build_host("localhost")
|
||||
+
|
||||
+ emerge_up_list = []
|
||||
+
|
||||
+ for package in installed_emerge_packages:
|
||||
+ if source.has_spec(package):
|
||||
+ spec = source.get_spec(package)
|
||||
+ if spec.getSourceRelease() > imdb.get_version(package)[1]:
|
||||
+ emerge_up_list.append(package)
|
||||
+
|
||||
+ if ctx.get_option('output_dir'):
|
||||
+ ctx.ui.info(_('Output directory: %s') % ctx.config.options.output_dir)
|
||||
+ else:
|
||||
+ ctx.ui.info(_('Outputting binary packages in the package cache.'))
|
||||
+ ctx.config.options.output_dir = ctx.config.cached_packages_dir()
|
||||
+
|
||||
+ repos = pisi.api.list_repos()
|
||||
+ pisi.api.update_repos(repos, ctx.get_option('force'))
|
||||
+
|
||||
+ pisi.api.emerge(emerge_up_list)
|
||||
diff -Nuar a/pisi/cli/pisicli.py b/pisi/cli/pisicli.py
|
||||
--- a/pisi/cli/pisicli.py 2011-05-26 20:17:29.000000000 +0300
|
||||
+++ b/pisi/cli/pisicli.py 2016-06-07 12:10:25.448737817 +0300
|
||||
@@ -29,6 +29,7 @@
|
||||
import pisi.cli.deletecache
|
||||
import pisi.cli.delta
|
||||
import pisi.cli.emerge
|
||||
+import pisi.cli.emergeup
|
||||
import pisi.cli.fetch
|
||||
import pisi.cli.graph
|
||||
import pisi.cli.index
|
||||
@@ -1,37 +0,0 @@
|
||||
diff -Nuar a/pisi/cli/fetch.py b/pisi/cli/fetch.py
|
||||
--- a/pisi/cli/fetch.py 2011-05-26 20:17:29.000000000 +0300
|
||||
+++ b/pisi/cli/fetch.py 2016-06-14 22:39:14.000000000 +0300
|
||||
@@ -20,6 +20,7 @@
|
||||
import pisi.cli.command as command
|
||||
import pisi.context as ctx
|
||||
import pisi.api
|
||||
+import pisi
|
||||
|
||||
class Fetch(command.Command):
|
||||
__doc__ = _("""Fetch a package
|
||||
@@ -45,12 +46,24 @@
|
||||
def add_options(self, group):
|
||||
group.add_option("-o", "--output-dir", action="store", default=os.path.curdir,
|
||||
help=_("Output directory for the fetched packages"))
|
||||
+ group.add_option("--runtime-deps", action="store_true", default=None,
|
||||
+ help=_("Bağımlılıkları ile indirme açıklaması."))
|
||||
|
||||
def run(self):
|
||||
+ packages = pisi.db.packagedb.PackageDB()
|
||||
self.init(database = False, write = False)
|
||||
|
||||
if not self.args:
|
||||
self.help()
|
||||
return
|
||||
+
|
||||
+ full_packages = []
|
||||
+
|
||||
+ for pisi_package in self.args:
|
||||
+ package = packages.get_package(pisi_package)
|
||||
+ full_packages.append(pisi_package)
|
||||
+ if ctx.config.options.runtime_deps:
|
||||
+ for dep in package.runtimeDependencies():
|
||||
+ full_packages.append(dep.name())
|
||||
|
||||
- pisi.api.fetch(self.args, ctx.config.options.output_dir)
|
||||
+ pisi.api.fetch(full_packages, ctx.config.options.output_dir)
|
||||
@@ -1,12 +0,0 @@
|
||||
diff -Naur pisi~/operations/build.py pisi/operations/build.py
|
||||
--- pisi~/operations/build.py 2014-06-15 16:33:39.000000000 +0200
|
||||
+++ pisi/operations/build.py 2014-07-06 18:04:24.648575441 +0200
|
||||
@@ -402,6 +402,8 @@
|
||||
if self.build_type == "emul32":
|
||||
env["CC"] = "%s -m32" % os.getenv("CC")
|
||||
env["CXX"] = "%s -m32" % os.getenv("CXX")
|
||||
+ env["CFLAGS"] = os.getenv("CFLAGS").replace("-fPIC", "")
|
||||
+ env["CXXFLAGS"] = os.getenv("CXXFLAGS").replace("-fPIC", "")
|
||||
env["PKG_CONFIG_PATH"] = "/usr/lib32/pkgconfig"
|
||||
os.environ.update(env)
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
diff -Naur pisi~/index.py pisi/index.py
|
||||
--- pisi~/index.py 2014-03-07 23:03:46.000000000 +0100
|
||||
+++ pisi/index.py 2014-09-04 21:47:38.282627704 +0200
|
||||
@@ -13,6 +13,7 @@
|
||||
"""PiSi source/package index"""
|
||||
|
||||
import os
|
||||
+import re
|
||||
import shutil
|
||||
import multiprocessing
|
||||
|
||||
@@ -91,6 +92,7 @@
|
||||
specs = []
|
||||
deltas = {}
|
||||
|
||||
+ pkgs_sorted = False
|
||||
for fn in os.walk(repo_uri).next()[2]:
|
||||
if fn.endswith(ctx.const.delta_package_suffix) or fn.endswith(ctx.const.package_suffix):
|
||||
pkgpath = os.path.join(repo_uri,
|
||||
@@ -100,6 +102,9 @@
|
||||
fn), noln = False if ctx.config.get_option("verbose") else True)
|
||||
shutil.copy2(os.path.join(repo_uri, fn), pkgpath)
|
||||
os.remove(os.path.join(repo_uri, fn))
|
||||
+ pkgs_sorted = True
|
||||
+ if pkgs_sorted:
|
||||
+ ctx.ui.info("%-80.80s\r" % '')
|
||||
|
||||
for root, dirs, files in os.walk(repo_uri):
|
||||
# Filter hidden directories
|
||||
@@ -166,14 +171,26 @@
|
||||
|
||||
# Before calling pool.map check if list is empty or not: python#12157
|
||||
if latest_packages:
|
||||
- try:
|
||||
- # Add binary packages to index using a process pool
|
||||
- self.packages = pool.map(add_package, latest_packages)
|
||||
- except:
|
||||
- pool.terminate()
|
||||
- pool.join()
|
||||
- ctx.ui.info("")
|
||||
- raise
|
||||
+ sorted_pkgs = {}
|
||||
+ for pkg in latest_packages:
|
||||
+ key = re.search("\/((lib)?[\d\w])\/", pkg[0])
|
||||
+ key = key.group(1) if key else os.path.dirname(pkg[0])
|
||||
+ try:
|
||||
+ sorted_pkgs[key].append(pkg)
|
||||
+ except KeyError:
|
||||
+ sorted_pkgs[key] = [pkg]
|
||||
+ self.packages = []
|
||||
+ for key, pkgs in sorted(sorted_pkgs.items()):
|
||||
+ ctx.ui.info("%-80.80s\r" % (_("Adding packages from directory %s... " % key)), noln=True)
|
||||
+ try:
|
||||
+ # Add binary packages to index using a process pool
|
||||
+ self.packages.extend(pool.map(add_package, pkgs))
|
||||
+ except:
|
||||
+ pool.terminate()
|
||||
+ pool.join()
|
||||
+ ctx.ui.info("")
|
||||
+ raise
|
||||
+ ctx.ui.info("%-80.80s\r" % (_("Adding packages from directory %s... done." % key)))
|
||||
|
||||
ctx.ui.info("")
|
||||
pool.close()
|
||||
@@ -1,283 +0,0 @@
|
||||
diff -Naur pisi~/api.py pisi/api.py
|
||||
--- pisi~/api.py 2014-06-15 16:33:39.000000000 +0200
|
||||
+++ pisi/api.py 2014-06-24 22:36:50.565227969 +0200
|
||||
@@ -401,10 +401,9 @@
|
||||
|
||||
>>> [("kvm", (["lib/modules/2.6.18.8-86/extra/kvm-amd.ko","lib/modules/2.6.18.8-86/extra/kvm-intel.ko"])),]
|
||||
"""
|
||||
- filesdb = pisi.db.filesldb.FilesLDB()
|
||||
if term.startswith("/"): # FIXME: why? why?
|
||||
term = term[1:]
|
||||
- return filesdb.search_file(term)
|
||||
+ return ctx.filesdb.search_file(term)
|
||||
|
||||
def fetch(packages=[], path=os.path.curdir):
|
||||
"""
|
||||
@@ -869,7 +868,6 @@
|
||||
# FIXME: rebuild_db is only here for filesdb and it really is ugly. we should not need any rebuild.
|
||||
@locked
|
||||
def rebuild_db():
|
||||
- filesdb = pisi.db.filesldb.FilesLDB()
|
||||
|
||||
# save parameters and shutdown pisi
|
||||
options = ctx.config.options
|
||||
@@ -877,9 +875,9 @@
|
||||
comar = ctx.comar
|
||||
pisi._cleanup()
|
||||
|
||||
- filesdb.close()
|
||||
- filesdb.destroy()
|
||||
- filesdb = pisi.db.filesldb.FilesLDB()
|
||||
+ ctx.filesdb.close()
|
||||
+ ctx.filesdb.destroy()
|
||||
+ ctx.filesdb = pisi.db.filesldb.FilesLDB()
|
||||
|
||||
# reinitialize everything
|
||||
set_userinterface(ui)
|
||||
diff -Naur pisi~/atomicoperations.py pisi/atomicoperations.py
|
||||
--- pisi~/atomicoperations.py 2014-06-15 16:33:39.000000000 +0200
|
||||
+++ pisi/atomicoperations.py 2014-06-25 19:10:49.061679815 +0200
|
||||
@@ -120,6 +120,7 @@
|
||||
raise Error(_("Package %s not found in any active repository.") % name)
|
||||
|
||||
def __init__(self, package_fname, ignore_dep = None, ignore_file_conflicts = None):
|
||||
+ if not ctx.filesdb: ctx.filesdb = pisi.db.filesldb.FilesLDB()
|
||||
"initialize from a file name"
|
||||
super(Install, self).__init__(ignore_dep)
|
||||
if not ignore_file_conflicts:
|
||||
@@ -134,14 +135,10 @@
|
||||
self.metadata = self.package.metadata
|
||||
self.files = self.package.files
|
||||
self.pkginfo = self.metadata.package
|
||||
- self.filesdb = pisi.db.filesldb.FilesLDB()
|
||||
self.installdb = pisi.db.installdb.InstallDB()
|
||||
self.operation = INSTALL
|
||||
self.store_old_paths = None
|
||||
|
||||
- def __del__(self):
|
||||
- self.filesdb.close()
|
||||
-
|
||||
def install(self, ask_reinstall = True):
|
||||
|
||||
# Any package should remove the package it replaces before
|
||||
@@ -186,7 +183,7 @@
|
||||
def check_replaces(self):
|
||||
for replaced in self.pkginfo.replaces:
|
||||
if self.installdb.has_package(replaced.package):
|
||||
- pisi.operations.remove.remove_replaced_packages([replaced.package], filesdb=self.filesdb)
|
||||
+ pisi.operations.remove.remove_replaced_packages([replaced.package])
|
||||
|
||||
def check_versioning(self, version, release):
|
||||
try:
|
||||
@@ -215,7 +212,7 @@
|
||||
# check file conflicts
|
||||
file_conflicts = []
|
||||
for f in self.files.list:
|
||||
- pkg, existing_file = self.filesdb.get_file(f.path)
|
||||
+ pkg, existing_file = ctx.filesdb.get_file(f.path)
|
||||
if pkg:
|
||||
dst = pisi.util.join_path(ctx.config.dest_dir(), f.path)
|
||||
if pkg != self.pkginfo.name and not os.path.isdir(dst) and really_conflicts(pkg):
|
||||
@@ -282,7 +279,7 @@
|
||||
self.old_files = self.installdb.get_files(pkg.name)
|
||||
self.old_pkginfo = self.installdb.get_info(pkg.name)
|
||||
self.old_path = self.installdb.pkg_dir(pkg.name, iversion_s, irelease_s)
|
||||
- self.remove_old = Remove(pkg.name, store_old_paths = self.store_old_paths, filesdb = self.filesdb)
|
||||
+ self.remove_old = Remove(pkg.name, store_old_paths = self.store_old_paths)
|
||||
self.remove_old.run_preremove()
|
||||
self.remove_old.run_postremove()
|
||||
|
||||
@@ -454,7 +451,7 @@
|
||||
if os.path.samestat(new_file_stat, old_file_stat):
|
||||
break
|
||||
else:
|
||||
- Remove.remove_file(old_file, self.pkginfo.name, store_old_paths=self.store_old_paths, filesdb=self.filesdb)
|
||||
+ Remove.remove_file(old_file, self.pkginfo.name, store_old_paths=self.store_old_paths)
|
||||
|
||||
if self.reinstall():
|
||||
# get 'config' typed file objects
|
||||
@@ -512,7 +509,7 @@
|
||||
def update_databases(self):
|
||||
"update databases"
|
||||
if self.reinstall():
|
||||
- self.remove_old.remove_db(filesdb=self.filesdb)
|
||||
+ self.remove_old.remove_db()
|
||||
|
||||
if self.config_later:
|
||||
self.installdb.mark_pending(self.pkginfo.name)
|
||||
@@ -531,7 +528,7 @@
|
||||
pisi.api.add_needs_reboot(package_name)
|
||||
|
||||
# filesdb
|
||||
- self.filesdb.add_files(self.metadata.package.name, self.files)
|
||||
+ ctx.filesdb.add_files(self.metadata.package.name, self.files)
|
||||
|
||||
# installed packages
|
||||
self.installdb.add_package(self.pkginfo)
|
||||
@@ -562,10 +559,10 @@
|
||||
|
||||
class Remove(AtomicOperation):
|
||||
|
||||
- def __init__(self, package_name, ignore_dep = None, store_old_paths = None, filesdb = None):
|
||||
+ def __init__(self, package_name, ignore_dep = None, store_old_paths = None):
|
||||
+ if not ctx.filesdb: ctx.filesdb = pisi.db.filesldb.FilesLDB()
|
||||
super(Remove, self).__init__(ignore_dep)
|
||||
self.installdb = pisi.db.installdb.InstallDB()
|
||||
- self.filesdb = filesdb
|
||||
self.package_name = package_name
|
||||
self.package = self.installdb.get_package(self.package_name)
|
||||
self.store_old_paths = store_old_paths
|
||||
@@ -577,10 +574,9 @@
|
||||
ctx.ui.warning(_('File list could not be read for package %s, continuing removal.') % package_name)
|
||||
self.files = pisi.files.Files()
|
||||
|
||||
- def run(self, filesdb = None):
|
||||
+ def run(self):
|
||||
"""Remove a single package"""
|
||||
|
||||
- if filesdb: self.filesdb = filesdb
|
||||
ctx.ui.status(_('Removing package %s') % self.package_name)
|
||||
ctx.ui.notify(pisi.ui.removing, package = self.package, files = self.files)
|
||||
if not self.installdb.has_package(self.package_name):
|
||||
@@ -591,7 +587,7 @@
|
||||
|
||||
self.run_preremove()
|
||||
for fileinfo in self.files.list:
|
||||
- self.remove_file(fileinfo, self.package_name, True, filesdb=filesdb)
|
||||
+ self.remove_file(fileinfo, self.package_name, True)
|
||||
|
||||
self.run_postremove()
|
||||
|
||||
@@ -609,7 +605,7 @@
|
||||
# is there any package who depends on this package?
|
||||
|
||||
@staticmethod
|
||||
- def remove_file(fileinfo, package_name, remove_permanent=False, store_old_paths=None, filesdb=None):
|
||||
+ def remove_file(fileinfo, package_name, remove_permanent=False, store_old_paths=None):
|
||||
|
||||
if fileinfo.permanent and not remove_permanent:
|
||||
return
|
||||
@@ -621,9 +617,7 @@
|
||||
# package (this can legitimately occur while upgrading
|
||||
# two packages such that a file has moved from one package to
|
||||
# another as in #2911)
|
||||
- if not filesdb:
|
||||
- filesdb = pisi.db.filesldb.FilesLDB()
|
||||
- pkg, existing_file = filesdb.get_file(fileinfo.path)
|
||||
+ pkg, existing_file = ctx.filesdb.get_file(fileinfo.path)
|
||||
if pkg and not pkg == package_name:
|
||||
ctx.ui.warning(_('Not removing conflicted file : %s') % fpath)
|
||||
return
|
||||
@@ -690,17 +684,16 @@
|
||||
def remove_pisi_files(self):
|
||||
util.clean_dir(self.package.pkg_dir())
|
||||
|
||||
- def remove_db(self, filesdb=None):
|
||||
+ def remove_db(self):
|
||||
self.installdb.remove_package(self.package_name)
|
||||
- if not filesdb: self.filesdb.remove_files(self.files.list)
|
||||
- else: filesdb.remove_files(self.files.list)
|
||||
+ ctx.filesdb.remove_files(self.files.list)
|
||||
# FIX:DB
|
||||
# # FIXME: something goes wrong here, if we use ctx operations ends up with segmentation fault!
|
||||
# pisi.db.packagedb.remove_tracking_package(self.package_name)
|
||||
|
||||
|
||||
-def remove_single(package_name, filesdb=None):
|
||||
- Remove(package_name).run(filesdb=filesdb)
|
||||
+def remove_single(package_name):
|
||||
+ Remove(package_name).run()
|
||||
|
||||
def build(package):
|
||||
# wrapper for build op
|
||||
diff -Naur pisi~/context.py pisi/context.py
|
||||
--- pisi~/context.py 2011-05-26 19:17:29.000000000 +0200
|
||||
+++ pisi/context.py 2014-06-24 22:28:17.685246708 +0200
|
||||
@@ -62,3 +62,5 @@
|
||||
|
||||
def keyboard_interrupt_pending():
|
||||
return sig and sig.signal_pending(signal.SIGINT)
|
||||
+
|
||||
+filesdb = None
|
||||
diff -Naur pisi~/operations/install.py pisi/operations/install.py
|
||||
--- pisi~/operations/install.py 2014-06-15 16:33:39.000000000 +0200
|
||||
+++ pisi/operations/install.py 2014-06-24 22:40:35.901219735 +0200
|
||||
@@ -95,7 +95,6 @@
|
||||
ctx.ui.info(util.colorize(_("Downloading %d / %d") % (order.index(x)+1, len(order)), "yellow"))
|
||||
install_op = atomicoperations.Install.from_name(x)
|
||||
paths.append(install_op.package_fname)
|
||||
- install_op = None
|
||||
|
||||
# fetch to be installed packages but do not install them.
|
||||
if ctx.get_option('fetch_only'):
|
||||
@@ -108,7 +107,6 @@
|
||||
ctx.ui.info(util.colorize(_("Installing %d / %d") % (paths.index(path)+1, len(paths)), "yellow"))
|
||||
install_op = atomicoperations.Install(path)
|
||||
install_op.install(False)
|
||||
- install_op = None
|
||||
|
||||
return True
|
||||
|
||||
diff -Naur pisi~/operations/remove.py pisi/operations/remove.py
|
||||
--- pisi~/operations/remove.py 2014-06-15 16:33:39.000000000 +0200
|
||||
+++ pisi/operations/remove.py 2014-06-24 22:37:47.963225871 +0200
|
||||
@@ -24,11 +24,9 @@
|
||||
import pisi.ui as ui
|
||||
import pisi.db
|
||||
|
||||
-def remove(A, ignore_dep = False, ignore_safety = False, filesdb = None):
|
||||
+def remove(A, ignore_dep = False, ignore_safety = False):
|
||||
"""remove set A of packages from system (A is a list of package names)"""
|
||||
|
||||
- if not filesdb: filesdb = pisi.db.filesldb.FilesLDB()
|
||||
-
|
||||
componentdb = pisi.db.componentdb.ComponentDB()
|
||||
installdb = pisi.db.installdb.InstallDB()
|
||||
|
||||
@@ -82,7 +80,7 @@
|
||||
|
||||
for x in order:
|
||||
if installdb.has_package(x):
|
||||
- atomicoperations.remove_single(x, filesdb=filesdb)
|
||||
+ atomicoperations.remove_single(x)
|
||||
else:
|
||||
ctx.ui.info(_('Package %s is not installed. Cannot remove.') % x)
|
||||
|
||||
@@ -129,6 +127,6 @@
|
||||
if remove(obsoletes, ignore_dep=True, ignore_safety=True):
|
||||
raise Exception(_("Obsoleted packages remaining"))
|
||||
|
||||
-def remove_replaced_packages(replaced, filesdb=None):
|
||||
- if remove(replaced, ignore_dep=True, ignore_safety=True, filesdb=filesdb):
|
||||
+def remove_replaced_packages(replaced):
|
||||
+ if remove(replaced, ignore_dep=True, ignore_safety=True):
|
||||
raise Exception(_("Replaced package remains"))
|
||||
diff -Naur pisi~/operations/upgrade.py pisi/operations/upgrade.py
|
||||
--- pisi~/operations/upgrade.py 2014-06-15 16:33:39.000000000 +0200
|
||||
+++ pisi/operations/upgrade.py 2014-06-24 22:40:50.745219193 +0200
|
||||
@@ -205,7 +205,6 @@
|
||||
ctx.ui.info(util.colorize(_("Downloading %d / %d") % (order.index(x)+1, len(order)), "yellow"))
|
||||
install_op = atomicoperations.Install.from_name(x)
|
||||
paths.append(install_op.package_fname)
|
||||
- install_op = None
|
||||
|
||||
# fetch to be upgraded packages but do not install them.
|
||||
if ctx.get_option('fetch_only'):
|
||||
@@ -220,7 +219,6 @@
|
||||
ctx.ui.info(util.colorize(_("Installing %d / %d") % (paths.index(path)+1, len(paths)), "yellow"))
|
||||
install_op = atomicoperations.Install(path, ignore_file_conflicts = True)
|
||||
install_op.install(not ctx.get_option('compare_sha1sum'))
|
||||
- install_op = None
|
||||
|
||||
def plan_upgrade(A, force_replaced=True, replaces=None):
|
||||
# FIXME: remove force_replaced
|
||||
diff -Naur pisi-cli~ pisi-cli
|
||||
--- pisi-cli~ 2011-05-26 19:17:29.000000000 +0200
|
||||
+++ pisi-cli 2014-06-25 18:24:25.499781521 +0200
|
||||
@@ -79,4 +79,6 @@
|
||||
signal.signal(signal.SIGTERM, sig_handler)
|
||||
|
||||
cli = pisicli.PisiCLI()
|
||||
+ if cli.command.name[1] in "rdb sf".split():
|
||||
+ ctx.filesdb = pisi.db.filesldb.FilesLDB()
|
||||
cli.run_command()
|
||||
@@ -1,66 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free
|
||||
# Software Foundation; either version 2 of the License, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# Please read the COPYING file.
|
||||
|
||||
# ActionsAPI Modules
|
||||
from pisi.actionsapi import get
|
||||
from pisi.actionsapi import cmaketools
|
||||
from pisi.actionsapi import shelltools
|
||||
|
||||
basename = "kde5"
|
||||
|
||||
prefix = "/%s" % get.defaultprefixDIR()
|
||||
libdir = "%s/lib" % prefix
|
||||
bindir = "%s/bin" % prefix
|
||||
libexecdir = "%s/lib" % prefix
|
||||
iconsdir = "%s/share/icons" % prefix
|
||||
applicationsdir = "%s/share/applications/%s" % (prefix, basename)
|
||||
mandir = "/%s" % get.manDIR()
|
||||
sharedir = "%s/share" % prefix
|
||||
localedir = "%s/share/locale" % prefix
|
||||
qmldir = "%s/lib/qt5/qml" % prefix
|
||||
plugindir = "%s/lib/qt5/plugins" % prefix
|
||||
moduledir = "%s/lib/qt5/mkspecs/modules" % prefix
|
||||
pythondir = "%s/bin/python" % prefix
|
||||
appsdir = "%s" % sharedir
|
||||
sysconfdir= "/etc"
|
||||
configdir = "%s/xdg" % sysconfdir
|
||||
servicesdir = "%s/services" % sharedir
|
||||
servicetypesdir = "%s/servicetypes" % sharedir
|
||||
includedir = "%s/include" % prefix
|
||||
docdir = "/%s/%s" % (get.docDIR(), basename)
|
||||
htmldir = "%s/html" % docdir
|
||||
wallpapersdir = "%s/share/wallpapers" % prefix
|
||||
|
||||
def configure(parameters = '', installPrefix = prefix, sourceDir = '..'):
|
||||
''' parameters -DLIB_INSTALL_DIR="hede" -DSOMETHING_USEFUL=1'''
|
||||
|
||||
shelltools.makedirs("build")
|
||||
shelltools.cd("build")
|
||||
|
||||
cmaketools.configure("-DCMAKE_BUILD_TYPE=Release \
|
||||
-DKDE_INSTALL_LIBEXECDIR=%s \
|
||||
-DCMAKE_INSTALL_LIBDIR=lib \
|
||||
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
|
||||
-DKDE_INSTALL_QMLDIR=%s \
|
||||
-DKDE_INSTALL_SYSCONFDIR=%s \
|
||||
-DKDE_INSTALL_PLUGINDIR=%s \
|
||||
-DECM_MKSPECS_INSTALL_DIR=%s \
|
||||
-DBUILD_TESTING=OFF \
|
||||
-DKDE_INSTALL_LIBDIR=lib \
|
||||
-Wno-dev \
|
||||
-DCMAKE_INSTALL_PREFIX=%s %s" % (libexecdir, qmldir, sysconfdir, plugindir, moduledir, prefix, parameters), installPrefix, sourceDir)
|
||||
|
||||
shelltools.cd("..")
|
||||
|
||||
def make(parameters = ''):
|
||||
cmaketools.make('-C build %s' % parameters)
|
||||
|
||||
def install(parameters = '', argument = 'install'):
|
||||
cmaketools.install('-C build %s' % parameters, argument)
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
diff -Nuar a/pisi/actionsapi/kerneltools.py b/pisi/actionsapi/kerneltools.py
|
||||
--- a/pisi/actionsapi/kerneltools.py 2014-03-08 00:03:46.000000000 +0200
|
||||
+++ b/pisi/actionsapi/kerneltools.py 2020-01-05 19:42:38.461427561 +0300
|
||||
@@ -268,7 +268,9 @@
|
||||
#######################Workaround ends here ...
|
||||
|
||||
# make defconfig and install the headers
|
||||
- autotools.make("%s defconfig" % make_cmd)
|
||||
+ #autotools.make("%s defconfig" % make_cmd)
|
||||
+ #kernel-5.4
|
||||
+ autotools.make("%s mrproper" % make_cmd)
|
||||
autotools.rawInstall(make_cmd, "headers_install")
|
||||
|
||||
oldwd = os.getcwd()
|
||||
@@ -1,34 +0,0 @@
|
||||
diff -Nuar pisi-2.6.old/pisi/actionsapi/kerneltools.py pisi-2.6/pisi/actionsapi/kerneltools.py
|
||||
--- pisi-2.6.old/pisi/actionsapi/kerneltools.py 2014-03-08 00:03:46.000000000 +0200
|
||||
+++ pisi-2.6/pisi/actionsapi/kerneltools.py 2019-01-14 07:07:34.637002938 +0300
|
||||
@@ -187,13 +187,13 @@
|
||||
def installHeaders(extraHeaders=None):
|
||||
""" Install the files needed to build out-of-tree kernel modules. """
|
||||
|
||||
- extras = ["drivers/media/dvb-core",
|
||||
- "drivers/media/dvb-frontends",
|
||||
- "drivers/media/tuners",
|
||||
- "drivers/media/platform"]
|
||||
+ #extras = ["drivers/media/dvb-core",
|
||||
+ # "drivers/media/dvb-frontends",
|
||||
+ # "drivers/media/tuners",
|
||||
+ # "drivers/media/platform"]
|
||||
|
||||
- if extraHeaders:
|
||||
- extras.extend(extraHeaders)
|
||||
+ #if extraHeaders:
|
||||
+ # extras.extend(extraHeaders)
|
||||
|
||||
pruned = ["include", "scripts", "Documentation"]
|
||||
wanted = ["Makefile*", "Kconfig*", "Kbuild*", "*.sh", "*.pl", "*.lds"]
|
||||
@@ -215,8 +215,8 @@
|
||||
shelltools.system(find_cmd)
|
||||
|
||||
# Install additional headers
|
||||
- for headers in extras:
|
||||
- shelltools.system("cp -a %s/*.h %s/%s" % (headers, destination, headers))
|
||||
+ #for headers in extras:
|
||||
+ # shelltools.system("cp -a %s/*.h %s/%s" % (headers, destination, headers))
|
||||
|
||||
# Install remaining headers
|
||||
shelltools.system("cp -a %s %s" % (" ".join(pruned), destination))
|
||||
@@ -1,99 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import gettext
|
||||
|
||||
import pisi.actionsapi
|
||||
import pisi.context as ctx
|
||||
from pisi.actionsapi import get
|
||||
from pisi.actionsapi.shelltools import system
|
||||
|
||||
__trans = gettext.translation('pisi', fallback=True)
|
||||
_ = __trans.ugettext
|
||||
|
||||
|
||||
class ConfigureError(pisi.actionsapi.Error):
|
||||
def __init__(self, value=''):
|
||||
pisi.actionsapi.Error.__init__(self, value)
|
||||
self.value = value
|
||||
ctx.ui.error(value)
|
||||
|
||||
|
||||
class CompileError(pisi.actionsapi.Error):
|
||||
def __init__(self, value=''):
|
||||
pisi.actionsapi.Error.__init__(self, value)
|
||||
self.value = value
|
||||
ctx.ui.error(value)
|
||||
|
||||
|
||||
class InstallError(pisi.actionsapi.Error):
|
||||
def __init__(self, value=''):
|
||||
pisi.actionsapi.Error.__init__(self, value)
|
||||
self.value = value
|
||||
ctx.ui.error(value)
|
||||
|
||||
|
||||
def configure(parameters='', build_dir='build'):
|
||||
"""
|
||||
Configures the project into the build directory with the parameters using meson.
|
||||
|
||||
Args:
|
||||
parameters (str): Extra parameters for the command. Default is empty string.
|
||||
build_dir (str): Build directory. Default is 'build'.
|
||||
|
||||
Examples:
|
||||
>>> mesontools.configure()
|
||||
>>> mesontools.configure('extra parameters')
|
||||
>>> mesontools.configure('extra parameters', 'custom_build_dir')
|
||||
"""
|
||||
default_parameters = ' '.join([
|
||||
'--prefix=/%s' % get.defaultprefixDIR(),
|
||||
'--bindir=/usr/bin',
|
||||
'--datadir=/%s' % get.dataDIR(),
|
||||
'--includedir=/usr/include',
|
||||
'--infodir=/%s' % get.infoDIR(),
|
||||
'--libdir=/%s' % ('usr/lib32' if get.buildTYPE() == 'emul32' else 'usr/lib'),
|
||||
'--libexecdir=/%s' % get.libexecDIR(),
|
||||
'--localedir=/usr/share/locale',
|
||||
'--localstatedir=/%s' % get.localstateDIR(),
|
||||
'--mandir=/%s' % get.manDIR(),
|
||||
'--sbindir=/%s' % get.sbinDIR(),
|
||||
'--sharedstatedir=com',
|
||||
'--sysconfdir=/etc',
|
||||
'--default-library=shared',
|
||||
])
|
||||
if system('meson setup %s %s %s' % (default_parameters, parameters, build_dir)):
|
||||
raise ConfigureError(_('Configuration failed.'))
|
||||
|
||||
|
||||
def build(parameters='', build_dir='build'):
|
||||
"""
|
||||
Builds the project into the build directory with the parameters using ninja. Instead of letting ninja
|
||||
to detect number of cores, this function gets the number from PISI configurations.
|
||||
|
||||
Args:
|
||||
parameters (str): Extra parameters for the command. Default is empty string.
|
||||
build_dir (str): Build directory. Default is 'build'.
|
||||
|
||||
Examples:
|
||||
>>> mesontools.build()
|
||||
>>> mesontools.build('extra parameters')
|
||||
>>> mesontools.build('extra parameters', 'custom_build_dir')
|
||||
"""
|
||||
if system('ninja -C %s %s %s' % (build_dir, parameters, get.makeJOBS())):
|
||||
raise CompileError(_('Make failed.'))
|
||||
|
||||
|
||||
def install(parameters='', build_dir='build'):
|
||||
"""
|
||||
Installs the project to the destination directory.
|
||||
|
||||
Args:
|
||||
parameters (str): Extra parameters for the command. Default is empty string.
|
||||
build_dir (str): Build directory. Default is 'build'.
|
||||
|
||||
Examples:
|
||||
>>> mesontools.install()
|
||||
>>> mesontools.install('extra parameters')
|
||||
>>> mesontools.install('extra parameters', 'custom_build_dir')
|
||||
"""
|
||||
if system('DESTDIR=%s ninja -C %s %s install' % (get.installDIR(), build_dir, parameters, )):
|
||||
raise InstallError(_('Install failed.'))
|
||||
@@ -1,11 +0,0 @@
|
||||
--- pisi/db/filesldb.py~ 2014-06-15 16:33:39.000000000 +0200
|
||||
+++ pisi/db/filesldb.py 2014-06-17 18:29:52.356729861 +0200
|
||||
@@ -27,7 +27,7 @@
|
||||
self.files_ldb_path = os.path.join(ctx.config.info_dir(), ctx.const.files_ldb)
|
||||
self.filesdb = plyvel.DB(self.files_ldb_path, create_if_missing=True)
|
||||
if not [f for f in os.listdir(self.files_ldb_path) if f.endswith('.ldb')]:
|
||||
- self.destroy()
|
||||
+ if ctx.comar: self.destroy()
|
||||
self.create_filesdb()
|
||||
|
||||
def __del__(self):
|
||||
@@ -1,277 +0,0 @@
|
||||
diff -Naur pisi~/cli/pisicli.py pisi/cli/pisicli.py
|
||||
--- pisi~/cli/pisicli.py 2011-05-26 19:17:29.000000000 +0200
|
||||
+++ pisi/cli/pisicli.py 2014-07-05 20:01:49.432333678 +0200
|
||||
@@ -39,6 +39,7 @@
|
||||
import pisi.cli.listavailable
|
||||
import pisi.cli.listcomponents
|
||||
import pisi.cli.listinstalled
|
||||
+import pisi.cli.listorphaned
|
||||
import pisi.cli.listpending
|
||||
import pisi.cli.listrepo
|
||||
import pisi.cli.listsources
|
||||
@@ -46,6 +47,7 @@
|
||||
import pisi.cli.rebuilddb
|
||||
import pisi.cli.remove
|
||||
import pisi.cli.removerepo
|
||||
+import pisi.cli.removeorphaned
|
||||
import pisi.cli.enablerepo
|
||||
import pisi.cli.disablerepo
|
||||
import pisi.cli.searchfile
|
||||
diff -Naur pisi~/cli/listorphaned.py pisi/cli/listorphaned.py
|
||||
--- pisi~/cli/listorphaned.py 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ pisi/cli/listorphaned.py 2014-09-15 22:22:18.827459865 +0200
|
||||
@@ -0,0 +1,59 @@
|
||||
+# -*- coding:utf-8 -*-
|
||||
+#
|
||||
+# Copyright (C) 2014, marcin.bojara (at) gmail.com
|
||||
+#
|
||||
+# This program is free software; you can redistribute it and/or modify it under
|
||||
+# the terms of the GNU General Public License as published by the Free
|
||||
+# Software Foundation; either version 2 of the License, or (at your option)
|
||||
+# any later version.
|
||||
+#
|
||||
+# Please read the COPYING file.
|
||||
+#
|
||||
+
|
||||
+import optparse
|
||||
+
|
||||
+import gettext
|
||||
+__trans = gettext.translation('pisi', fallback=True)
|
||||
+_ = __trans.ugettext
|
||||
+
|
||||
+import pisi.cli.command as command
|
||||
+import pisi.context as ctx
|
||||
+import pisi.util as util
|
||||
+import pisi.db
|
||||
+
|
||||
+class ListOrphaned(command.Command):
|
||||
+ __doc__ = _("""List orphaned packages
|
||||
+
|
||||
+Usage: list-orphaned
|
||||
+
|
||||
+Lists packages installed as dependency, but no longer needed by any other installed package.
|
||||
+""")
|
||||
+ __metaclass__ = command.autocommand
|
||||
+
|
||||
+ def __init__(self, args):
|
||||
+ super(ListOrphaned, self).__init__(args)
|
||||
+ self.installdb = pisi.db.installdb.InstallDB()
|
||||
+
|
||||
+ name = ("list-orphaned", "lo")
|
||||
+
|
||||
+ def options(self):
|
||||
+
|
||||
+ group = optparse.OptionGroup(self.parser, _("list-orphaned options"))
|
||||
+ group.add_option("-a", "--all", action="store_true",
|
||||
+ default=False, help=_("Show all packages without reverse dependencies"))
|
||||
+ group.add_option("-x", "--exclude", action="append",
|
||||
+ default=None, help=_("Ignore packages and components whose basenames match pattern."))
|
||||
+ self.parser.add_option_group(group)
|
||||
+
|
||||
+ def run(self):
|
||||
+
|
||||
+ self.init(database = True, write = False)
|
||||
+ orphaned = self.installdb.get_no_rev_deps() if self.options.all else self.installdb.get_orphaned()
|
||||
+
|
||||
+ if self.options.exclude:
|
||||
+ orphaned = pisi.blacklist.exclude(orphaned, ctx.get_option('exclude'))
|
||||
+
|
||||
+ if orphaned:
|
||||
+ ctx.ui.info(_("Orphaned packages:"))
|
||||
+ ctx.ui.info(util.format_by_columns(sorted(orphaned)))
|
||||
+ else: ctx.ui.info(_("No orphaned packages"))
|
||||
diff -Naur pisi~/cli/removeorphaned.py pisi/cli/removeorphaned.py
|
||||
--- pisi~/cli/removeorphaned.py 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ pisi/cli/removeorphaned.py 2014-09-15 22:22:37.484459184 +0200
|
||||
@@ -0,0 +1,55 @@
|
||||
+# -*- coding:utf-8 -*-
|
||||
+#
|
||||
+# Copyright (C) 2014, marcin.bojara (at) gmail.com
|
||||
+#
|
||||
+# This program is free software; you can redistribute it and/or modify it under
|
||||
+# the terms of the GNU General Public License as published by the Free
|
||||
+# Software Foundation; either version 2 of the License, or (at your option)
|
||||
+# any later version.
|
||||
+#
|
||||
+# Please read the COPYING file.
|
||||
+#
|
||||
+
|
||||
+import optparse
|
||||
+
|
||||
+import gettext
|
||||
+__trans = gettext.translation('pisi', fallback=True)
|
||||
+_ = __trans.ugettext
|
||||
+
|
||||
+import pisi.cli.command as command
|
||||
+import pisi.context as ctx
|
||||
+import pisi.api
|
||||
+import pisi.db
|
||||
+
|
||||
+class RemoveOrphaned(command.PackageOp):
|
||||
+ __doc__ = _("""Remove orphaned packages
|
||||
+
|
||||
+Usage: remove-orphaned
|
||||
+
|
||||
+Remove all orphaned packages from the system.
|
||||
+""")
|
||||
+ __metaclass__ = command.autocommand
|
||||
+
|
||||
+ def __init__(self,args):
|
||||
+ super(RemoveOrphaned, self).__init__(args)
|
||||
+ self.installdb = pisi.db.installdb.InstallDB()
|
||||
+
|
||||
+ name = ("remove-orphaned", "ro")
|
||||
+
|
||||
+ def options(self):
|
||||
+ group = optparse.OptionGroup(self.parser, _("remove-orphaned options"))
|
||||
+
|
||||
+ super(RemoveOrphaned, self).options(group)
|
||||
+ group.add_option("-x", "--exclude", action="append",
|
||||
+ default=None, help=_("When removing orphaned, ignore packages and components whose basenames match pattern."))
|
||||
+
|
||||
+ self.parser.add_option_group(group)
|
||||
+
|
||||
+ def run(self):
|
||||
+
|
||||
+ self.init(database = True, write = False)
|
||||
+ orphaned = self.installdb.get_orphaned()
|
||||
+ if ctx.get_option('exclude'):
|
||||
+ orphaned = pisi.blacklist.exclude(orphaned, ctx.get_option('exclude'))
|
||||
+
|
||||
+ pisi.api.remove(orphaned)
|
||||
diff -Naur pisi~/constants.py pisi/constants.py
|
||||
--- pisi~/constants.py 2014-06-15 16:33:39.000000000 +0200
|
||||
+++ pisi/constants.py 2014-08-14 20:51:46.437906848 +0200
|
||||
@@ -104,6 +104,7 @@
|
||||
self.__c.system_devel_component = "system.devel"
|
||||
self.__c.devels_component = "programming.devel"
|
||||
self.__c.docs_component = "programming.docs"
|
||||
+ self.__c.installed_extra = "installedextra"
|
||||
|
||||
#file/directory permissions
|
||||
self.__c.umask = 0022
|
||||
diff -Naur pisi~/db/installdb.py pisi/db/installdb.py
|
||||
--- pisi~/db/installdb.py 2014-06-15 16:33:39.000000000 +0200
|
||||
+++ pisi/db/installdb.py 2014-08-31 16:59:29.586602738 +0200
|
||||
@@ -67,6 +67,15 @@
|
||||
def init(self):
|
||||
self.installed_db = self.__generate_installed_pkgs()
|
||||
self.rev_deps_db = self.__generate_revdeps()
|
||||
+ self.installed_extra = self.__generate_installed_extra()
|
||||
+
|
||||
+ def __generate_installed_extra(self):
|
||||
+ ie = []
|
||||
+ ie_path = os.path.join(ctx.config.info_dir(), ctx.const.installed_extra)
|
||||
+ if os.path.isfile(ie_path):
|
||||
+ with open(ie_path) as ie_file:
|
||||
+ ie.extend(ie_file.read().strip().split("\n"))
|
||||
+ return ie
|
||||
|
||||
def __generate_installed_pkgs(self):
|
||||
def split_name(dirname):
|
||||
@@ -259,6 +268,19 @@
|
||||
|
||||
return rev_deps
|
||||
|
||||
+ def get_orphaned(self):
|
||||
+ """
|
||||
+ get list of packages installed as extra dependency,
|
||||
+ but without reverse dependencies now.
|
||||
+ """
|
||||
+ return [x for x in self.installed_extra if not self.get_rev_deps(x)]
|
||||
+
|
||||
+ def get_no_rev_deps(self):
|
||||
+ """
|
||||
+ get installed packages list which haven't reverse dependencies.
|
||||
+ """
|
||||
+ return [x for x in self.installed_db if not self.get_rev_deps(x)]
|
||||
+
|
||||
def pkg_dir(self, pkg, version, release):
|
||||
return pisi.util.join_path(ctx.config.packages_dir(), pkg + '-' + version + '-' + release)
|
||||
|
||||
diff -Naur pisi~/operations/install.py pisi/operations/install.py
|
||||
--- pisi~/operations/install.py 2014-09-15 22:14:00.381478078 +0200
|
||||
+++ pisi/operations/install.py 2014-07-03 18:54:49.000000000 +0200
|
||||
@@ -27,7 +27,7 @@
|
||||
import pisi.ui as ui
|
||||
import pisi.db
|
||||
|
||||
-def install_pkg_names(A, reinstall = False):
|
||||
+def install_pkg_names(A, reinstall = False, extra = False):
|
||||
"""This is the real thing. It installs packages from
|
||||
the repository, trying to perform a minimum number of
|
||||
installs"""
|
||||
@@ -78,7 +78,8 @@
|
||||
if ctx.get_option('dry_run'):
|
||||
return True
|
||||
|
||||
- if set(order) - A_0:
|
||||
+ extra_packages = set(order) - A_0
|
||||
+ if extra_packages:
|
||||
if not ctx.ui.confirm(_('There are extra packages due to dependencies. Do you want to continue?')):
|
||||
return False
|
||||
|
||||
@@ -91,10 +92,18 @@
|
||||
conflicts = operations.helper.check_conflicts(order, packagedb)
|
||||
|
||||
paths = []
|
||||
+ extra_paths = {}
|
||||
for x in order:
|
||||
ctx.ui.info(util.colorize(_("Downloading %d / %d") % (order.index(x)+1, len(order)), "yellow"))
|
||||
install_op = atomicoperations.Install.from_name(x)
|
||||
paths.append(install_op.package_fname)
|
||||
+ if x in extra_packages or (extra and x in A):
|
||||
+ extra_paths[install_op.package_fname] = x
|
||||
+ elif reinstall and x in installdb.installed_extra:
|
||||
+ installdb.installed_extra.remove(x)
|
||||
+ with open(os.path.join(ctx.config.info_dir(), ctx.const.installed_extra), "w") as ie_file:
|
||||
+ ie_file.write("\n".join(installdb.installed_extra) + ("\n" if installdb.installed_extra else ""))
|
||||
+
|
||||
|
||||
# fetch to be installed packages but do not install them.
|
||||
if ctx.get_option('fetch_only'):
|
||||
@@ -107,6 +116,12 @@
|
||||
ctx.ui.info(util.colorize(_("Installing %d / %d") % (paths.index(path)+1, len(paths)), "yellow"))
|
||||
install_op = atomicoperations.Install(path)
|
||||
install_op.install(False)
|
||||
+ try:
|
||||
+ with open(os.path.join(ctx.config.info_dir(), ctx.const.installed_extra), "a") as ie_file:
|
||||
+ ie_file.write("%s\n" % extra_paths[path])
|
||||
+ installdb.installed_extra.append(extra_paths[path])
|
||||
+ except KeyError:
|
||||
+ pass
|
||||
|
||||
return True
|
||||
|
||||
@@ -199,7 +214,7 @@
|
||||
ctx.ui.info(util.format_by_columns(sorted(extra_packages)))
|
||||
if not ctx.ui.confirm(_('Do you want to continue?')):
|
||||
raise Exception(_('External dependencies not satisfied'))
|
||||
- install_pkg_names(extra_packages, reinstall=True)
|
||||
+ install_pkg_names(extra_packages, reinstall=True, extra=True)
|
||||
|
||||
class PackageDB:
|
||||
def get_package(self, key, repo = None):
|
||||
diff -Naur pisi~/operations/remove.py pisi/operations/remove.py
|
||||
--- pisi~/operations/remove.py 2014-09-15 22:14:00.381478078 +0200
|
||||
+++ pisi/operations/remove.py 2014-07-03 18:54:49.000000000 +0200
|
||||
@@ -10,6 +10,7 @@
|
||||
# Please read the COPYING file.
|
||||
#
|
||||
|
||||
+import os
|
||||
import sys
|
||||
|
||||
import gettext
|
||||
@@ -81,6 +82,11 @@
|
||||
for x in order:
|
||||
if installdb.has_package(x):
|
||||
atomicoperations.remove_single(x)
|
||||
+ if x in installdb.installed_extra:
|
||||
+ installdb.installed_extra.remove(x)
|
||||
+ with open(os.path.join(ctx.config.info_dir(), ctx.const.installed_extra), "w") as ie_file:
|
||||
+ ie_file.write("\n".join(installdb.installed_extra) + ("\n" if installdb.installed_extra else ""))
|
||||
+
|
||||
else:
|
||||
ctx.ui.info(_('Package %s is not installed. Cannot remove.') % x)
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
diff -Nuar pisi-2.6-OSmanOS/pisi/actionsapi/pisitools.py pisi-2.6/pisi/actionsapi/pisitools.py
|
||||
--- pisi-2.6-OSmanOS/pisi/actionsapi/pisitools.py 2014-03-08 00:03:46.000000000 +0200
|
||||
+++ pisi-2.6/pisi/actionsapi/pisitools.py 2014-12-07 20:32:05.111207119 +0200
|
||||
@@ -41,6 +41,11 @@
|
||||
''' example call: pisitools.dobin("bin/xloadimage", "/bin", "xload") '''
|
||||
executable_insinto(join_path(get.installDIR(), destinationDirectory), sourceFile)
|
||||
|
||||
+def dopixmaps(sourceFile, destinationDirectory = '/usr/share/pixmaps'):
|
||||
+ '''insert a data file into /usr/share/pixmaps'''
|
||||
+ ''' example call: pisitools.dopixmaps("/usr/share/pixmaps/firefox", "firefox") '''
|
||||
+ readable_insinto(join_path(get.installDIR(), destinationDirectory), sourceFile)
|
||||
+
|
||||
def dodir(destinationDirectory):
|
||||
'''creates a directory tree'''
|
||||
makedirs(join_path(get.installDIR(), destinationDirectory))
|
||||
@@ -1,49 +0,0 @@
|
||||
[build]
|
||||
build_host = localhost
|
||||
# buildhelper = None
|
||||
commonflags = -mtune=atom -march=i686 -O2 -pipe -fomit-frame-pointer -fstack-protector -D_FORTIFY_SOURCE=2 -ggdb3 -funwind-tables -fasynchronous-unwind-tables
|
||||
cflags = %(commonflags)s
|
||||
cxxflags = %(commonflags)s
|
||||
host = i686-pc-linux-gnu
|
||||
cc = %(host)s-gcc
|
||||
cxx = %(host)s-g++
|
||||
compressionlevel = 9
|
||||
enableSandbox = True
|
||||
fallback = http://source.pisilinux.org/1.0
|
||||
generateDebug = False
|
||||
jobs = -j5
|
||||
ldflags = -Wl,-O1 -Wl,-z,relro -Wl,--hash-style=gnu -Wl,--as-needed -Wl,--sort-common
|
||||
ignored_build_types = emul32,_emul32
|
||||
|
||||
[directories]
|
||||
cache_root_dir = /var/cache/pisi
|
||||
archives_dir = %(cache_root_dir)s/archives
|
||||
cached_packages_dir = %(cache_root_dir)s/packages
|
||||
compiled_packages_dir = %(cache_root_dir)s/packages
|
||||
debug_packages_dir = %(cache_root_dir)s/packages-debug
|
||||
lib_dir = /var/lib/pisi
|
||||
history_dir = %(lib_dir)s/history
|
||||
index_dir = %(lib_dir)s/index
|
||||
info_dir = %(lib_dir)s/info
|
||||
kde_dir = /usr
|
||||
lock_dir = /run/lock/subsys
|
||||
log_dir = /var/log
|
||||
packages_dir = %(lib_dir)s/package
|
||||
qt_dir = /usr
|
||||
tmp_dir = /var/pisi
|
||||
|
||||
[general]
|
||||
architecture = i686
|
||||
autoclean = False
|
||||
bandwidth_limit = 0
|
||||
destinationdirectory = /
|
||||
distribution = PisiLinux
|
||||
distribution_release = 2.0
|
||||
distribution_id = p2
|
||||
# ftp_proxy = None
|
||||
# http_proxy = None
|
||||
# https_proxy = None
|
||||
ignore_delta = False
|
||||
ignore_safety = False
|
||||
package_cache = False
|
||||
package_cache_limit = 0
|
||||
@@ -1,32 +0,0 @@
|
||||
for managing CFLAGS, CXXFLAGS and LDFLAGS you can use pisitools
|
||||
for CFLAGGS -> pisitools.cflags
|
||||
for LDFLAGGS -> pisitools.ldflags
|
||||
for CXXFLAGGS -> pisitools.cxxflags
|
||||
for both CFLAGGS and CXXFLAGS -> pisitools.flags
|
||||
|
||||
available operations:
|
||||
|
||||
add("param1", "param2", ..., "paramN")
|
||||
e.g.
|
||||
pisitools.cxxflags.add("-fpermisive")
|
||||
-> shelltools.export("CXXFLAGS", "%s -fpermisive" % get.CXXFLAGS())
|
||||
pisitools.flags.add("-fno-strict-aliasing", "-fPIC")
|
||||
-> shelltools.export("CFLAGS", "%s -fno-strict-aliasing -fPIC" % get.CFLAGS())
|
||||
-> shelltools.export("CXXFLAGS", "%s -ffno-strict-aliasing -fPIC" % get.CXXFLAGS())
|
||||
|
||||
remove("param1", "param2", ..., "paramN")
|
||||
e.g.
|
||||
pisitools.cflags.remove("-fno-strict-aliasing")
|
||||
-> shelltools.export("CFLAGS", get.CFLAGS().replace("-fno-strict-aliasing", ""))
|
||||
|
||||
replace("old value", "new value")
|
||||
e.g.
|
||||
pisitools.cflags.replace("-O2", "-O3")
|
||||
-> shelltools.export("CFLAGS", get.CFLAGS().replace("-O2", "-O3"))
|
||||
|
||||
sub(pattern, repl, count, flags)
|
||||
works like re.sub(pattern, repl, string, count, flags) for specified flags
|
||||
e.g.
|
||||
pisitools.cflags.replace("-O\d", "-Os")
|
||||
-> import re
|
||||
-> shelltools.export("CFLAGS", re.sub("-O\d", "-Os", get.CFLAGS()))
|
||||
@@ -1,139 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Copyright (C) 2011 TUBITAK/UEKAE
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free
|
||||
# Software Foundation; either version 2 of the License, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# Please read the COPYING file.
|
||||
|
||||
# Standart Python Modules
|
||||
import subprocess
|
||||
|
||||
import gettext
|
||||
__trans = gettext.translation('pisi', fallback=True)
|
||||
_ = __trans.ugettext
|
||||
|
||||
# PiSi Modules
|
||||
import pisi.context as ctx
|
||||
import pisi.actionsapi
|
||||
|
||||
class PkgconfigError(pisi.actionsapi.Error):
|
||||
def __init__(self, value=''):
|
||||
pisi.actionsapi.Error.__init__(self, value)
|
||||
self.value = value
|
||||
ctx.ui.error(value)
|
||||
|
||||
def getVariableForLibrary(library, variable):
|
||||
# Returns a specific variable provided in the library .pc file
|
||||
try:
|
||||
proc = subprocess.Popen(["pkg-config",
|
||||
"--variable=%s" % variable,
|
||||
"%s" % library],
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE)
|
||||
return_code = proc.wait()
|
||||
except OSError, exception:
|
||||
if exception.errno == 2:
|
||||
raise PkgconfigError(_("pkg-config is not installed on your system."))
|
||||
else:
|
||||
if return_code == 0 and proc.stdout:
|
||||
return proc.stdout.read().strip()
|
||||
else:
|
||||
# Command failed
|
||||
raise PkgconfigError(proc.stderr.read().strip())
|
||||
|
||||
def getLibraryVersion(library):
|
||||
"""Returns the module version provided in the library .pc file."""
|
||||
try:
|
||||
proc = subprocess.Popen(["pkg-config",
|
||||
"--modversion",
|
||||
library],
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE)
|
||||
return_code = proc.wait()
|
||||
except OSError, exception:
|
||||
if exception.errno == 2:
|
||||
raise PkgconfigError(_("pkg-config is not installed on your system."))
|
||||
else:
|
||||
if return_code == 0 and proc.stdout:
|
||||
return proc.stdout.read().strip()
|
||||
else:
|
||||
# Command failed
|
||||
raise PkgconfigError(proc.stderr.read().strip())
|
||||
|
||||
def getLibraryCFLAGS(library):
|
||||
"""Returns compiler flags for compiling with this library.
|
||||
Ex: -I/usr/include/nss"""
|
||||
try:
|
||||
proc = subprocess.Popen(["pkg-config",
|
||||
"--cflags",
|
||||
"%s" % library],
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE)
|
||||
return_code = proc.wait()
|
||||
except OSError, exception:
|
||||
if exception.errno == 2:
|
||||
raise PkgconfigError(_("pkg-config is not installed on your system."))
|
||||
else:
|
||||
if return_code == 0 and proc.stdout:
|
||||
return proc.stdout.read().strip()
|
||||
else:
|
||||
# Command failed
|
||||
raise PkgconfigError(proc.stderr.read().strip())
|
||||
|
||||
def getLibraryLIBADD(library):
|
||||
"""Returns linker flags for linking with this library.
|
||||
Ex: -lpng14"""
|
||||
try:
|
||||
proc = subprocess.Popen(["pkg-config",
|
||||
"--libs",
|
||||
"%s" % library],
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE)
|
||||
return_code = proc.wait()
|
||||
except OSError, exception:
|
||||
if exception.errno == 2:
|
||||
raise PkgconfigError(_("pkg-config is not installed on your system."))
|
||||
else:
|
||||
if return_code == 0 and proc.stdout:
|
||||
return proc.stdout.read().strip()
|
||||
else:
|
||||
# Command failed
|
||||
raise PkgconfigError(proc.stderr.read().strip())
|
||||
|
||||
def runManualCommand(*args):
|
||||
"""Runs the given command and returns the output."""
|
||||
cmd = ["pkg-config"]
|
||||
cmd.extend(args)
|
||||
try:
|
||||
proc = subprocess.Popen(cmd,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE)
|
||||
return_code = proc.wait()
|
||||
except OSError, exception:
|
||||
if exception.errno == 2:
|
||||
raise PkgconfigError(_("pkg-config is not installed on your system."))
|
||||
else:
|
||||
if return_code == 0 and proc.stdout:
|
||||
return proc.stdout.read().strip()
|
||||
else:
|
||||
# Command failed
|
||||
raise PkgconfigError(proc.stderr.read().strip())
|
||||
|
||||
|
||||
def libraryExists(library):
|
||||
"""Returns True if the library provides a .pc file."""
|
||||
result = None
|
||||
try:
|
||||
result = subprocess.call(["pkg-config",
|
||||
"--exists",
|
||||
"%s" % library])
|
||||
except OSError, exception:
|
||||
if exception.errno == 2:
|
||||
raise PkgconfigError(_("pkg-config is not installed on your system."))
|
||||
else:
|
||||
return result == 0
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Copyright (C) 2010 TUBITAK/UEKAE
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free
|
||||
# Software Foundation; either version 2 of the License, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# Please read the COPYING file.
|
||||
|
||||
import glob
|
||||
import gettext
|
||||
__trans = gettext.translation('pisi', fallback=True)
|
||||
_ = __trans.ugettext
|
||||
|
||||
# Pisi Modules
|
||||
import pisi.context as ctx
|
||||
|
||||
# ActionsAPI Modules
|
||||
import pisi.actionsapi
|
||||
|
||||
# ActionsAPI Modules
|
||||
from pisi.actionsapi import get
|
||||
from pisi.actionsapi import cmaketools
|
||||
from pisi.actionsapi import shelltools
|
||||
|
||||
basename = "qt5"
|
||||
|
||||
prefix = "/%s" % get.defaultprefixDIR()
|
||||
libdir = "%s/lib" % prefix
|
||||
libexecdir = "%s/libexec" % prefix
|
||||
sysconfdir= "/etc"
|
||||
bindir = "%s/bin" % prefix
|
||||
includedir = "%s/include" % prefix
|
||||
|
||||
# qt5 spesific variables
|
||||
|
||||
headerdir = "%s/include/%s" % (prefix, basename)
|
||||
datadir = "%s/share/%s" % (prefix, basename)
|
||||
docdir = "/%s/%s" % (get.docDIR(), basename)
|
||||
archdatadir = "%s/%s" % (libdir, basename)
|
||||
examplesdir = "%s/%s/examples" % (libdir, basename)
|
||||
importdir = "%s/%s/imports" % (libdir, basename)
|
||||
plugindir = "%s/%s/plugins" % (libdir, basename)
|
||||
qmldir = "%s/%s/qml" % (libdir, basename)
|
||||
testdir = "%s/share/%s" % (prefix, basename)
|
||||
translationdir = "%s/translations" % datadir
|
||||
|
||||
#Temporary bindir to avoid qt4 conflicts
|
||||
#qmake = "%s/qmake-qt5" % bindir
|
||||
qmake = "%s/qmake" % bindir
|
||||
|
||||
class ConfigureError(pisi.actionsapi.Error):
|
||||
def __init__(self, value=''):
|
||||
pisi.actionsapi.Error.__init__(self, value)
|
||||
self.value = value
|
||||
ctx.ui.error(value)
|
||||
|
||||
def configure(projectfile='', parameters='', installPrefix=prefix):
|
||||
if projectfile != '' and not shelltools.can_access_file(projectfile):
|
||||
raise ConfigureError(_("Project file '%s' not found.") % projectfile)
|
||||
|
||||
profiles = glob.glob("*.pro")
|
||||
if len(profiles) > 1 and projectfile == '':
|
||||
raise ConfigureError(_("It seems there are more than one .pro file, you must specify one. (Possible .pro files: %s)") % ", ".join(profiles))
|
||||
|
||||
shelltools.system("%s -makefile %s PREFIX='%s' QMAKE_CFLAGS+='%s' QMAKE_CXXFLAGS+='%s' %s" % (qmake, projectfile, installPrefix, get.CFLAGS(), get.CXXFLAGS(), parameters))
|
||||
|
||||
def make(parameters=''):
|
||||
cmaketools.make(parameters)
|
||||
|
||||
def install(parameters='', argument='install'):
|
||||
cmaketools.install('INSTALL_ROOT="%s" %s' % (get.installDIR(), parameters), argument)
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
diff -Nuar a/pisi/comariface.py b/pisi/comariface.py
|
||||
--- a/pisi/comariface.py 2011-05-26 20:17:29.000000000 +0300
|
||||
+++ b/pisi/comariface.py 2020-01-08 18:44:29.795094390 +0300
|
||||
@@ -10,16 +10,17 @@
|
||||
# Please read the COPYING file.
|
||||
#
|
||||
|
||||
+import gettext
|
||||
import os
|
||||
-import time
|
||||
import string
|
||||
+import time
|
||||
+
|
||||
+import pisi
|
||||
+import pisi.context as ctx
|
||||
|
||||
-import gettext
|
||||
__trans = gettext.translation('pisi', fallback=True)
|
||||
_ = __trans.ugettext
|
||||
|
||||
-import pisi
|
||||
-import pisi.context as ctx
|
||||
|
||||
class Error(pisi.Error):
|
||||
pass
|
||||
@@ -30,10 +31,12 @@
|
||||
except ImportError:
|
||||
raise Error(_("comar-api package is not fully installed"))
|
||||
|
||||
+
|
||||
def is_char_valid(char):
|
||||
"""Test if char is valid object path character."""
|
||||
return char in string.ascii_letters + string.digits + "_"
|
||||
|
||||
+
|
||||
def is_method_missing(exception):
|
||||
"""Tells if exception is about missing method in COMAR script"""
|
||||
if exception._dbus_error_name in ("tr.org.pardus.comar.python.missing",
|
||||
@@ -41,6 +44,7 @@
|
||||
return True
|
||||
return False
|
||||
|
||||
+
|
||||
def safe_script_name(package):
|
||||
"""Generates DBus-safe object name for package script names."""
|
||||
object = package
|
||||
@@ -51,6 +55,7 @@
|
||||
object = '_%s' % object
|
||||
return object
|
||||
|
||||
+
|
||||
def get_link():
|
||||
"""Connect to the COMAR daemon and return the link."""
|
||||
|
||||
@@ -190,8 +195,7 @@
|
||||
link = get_link()
|
||||
|
||||
package_name = safe_script_name(package_name)
|
||||
- scripts = set([safe_script_name(s.name) for s \
|
||||
- in provided_scripts if s.name])
|
||||
+ scripts = set([safe_script_name(s.name) for s in provided_scripts if s.name])
|
||||
scripts.add(package_name)
|
||||
|
||||
if package_name in list(link.System.Package):
|
||||
@@ -12,11 +12,7 @@
|
||||
<IsA>app:console</IsA>
|
||||
<Summary>PISI is the package management system of Pisi Linux</Summary>
|
||||
<Description>PISI is a modern package management system implemented in Python. Some of its main features are: package sources are written in XML and python, implements all functions through a simple-to-use API, integrates low-level and high-level package management features.</Description>
|
||||
<Archive sha1sum="379befb46ec1816f2ea35492bae3e3dda6c3cb93" type="targz">https://github.com/PisiLinuxNew/pisi/archive/v2.7.tar.gz</Archive>
|
||||
<AdditionalFiles>
|
||||
<AdditionalFile permission="0644" target="pisi.conf-i686">pisi.conf-i686</AdditionalFile>
|
||||
<AdditionalFile permission="0644" target="pisi.conf-x86_64">pisi.conf-x86_64</AdditionalFile>
|
||||
</AdditionalFiles>
|
||||
<Archive sha1sum="227a4a01f7686892c0ad44bce5c95cc2e634cc50" type="targz">https://github.com/PisiLinuxNew/pisi/archive/v2.7.1.tar.gz</Archive>
|
||||
<BuildDependencies>
|
||||
<Dependency>comar</Dependency>
|
||||
<Dependency>plyvel</Dependency>
|
||||
@@ -26,9 +22,6 @@
|
||||
<Dependency>intltool</Dependency>
|
||||
<Dependency versionFrom="1.18">leveldb-devel</Dependency>
|
||||
</BuildDependencies>
|
||||
<Patches>
|
||||
<Patch>kerneltools_extra_headers_moved.patch</Patch>
|
||||
</Patches>
|
||||
</Source>
|
||||
|
||||
<Package>
|
||||
@@ -68,11 +61,8 @@
|
||||
<AdditionalFile owner="root" permission="0644" target="/etc/pisi/mirrors.conf">mirrors.conf</AdditionalFile>
|
||||
<AdditionalFile owner="root" permission="0644" target="/etc/pisi/sandbox.conf">sandbox.conf</AdditionalFile>
|
||||
<AdditionalFile owner="root" permission="0644" target="/usr/share/mime/packages/pisi.xml">pisi.xml</AdditionalFile>
|
||||
<AdditionalFile owner="root" permission="0644" target="/usr/lib/pisilinux/pisi/actionsapi/pkgconfig.py">pkgconfig.py</AdditionalFile>
|
||||
<AdditionalFile owner="root" permission="0644" target="/etc/pisi/pisi.conf">pisi.conf</AdditionalFile>
|
||||
<AdditionalFile target="/usr/lib/tmpfiles.d/pisi.conf" permission="0644" owner="root">tmpfiles.conf</AdditionalFile>
|
||||
<AdditionalFile owner="root" permission="0644" target="/usr/lib/pisilinux/pisi/actionsapi/qt5.py">qt5.py</AdditionalFile>
|
||||
<AdditionalFile owner="root" permission="0644" target="/usr/lib/pisilinux/pisi/actionsapi/kde5.py">kde5.py</AdditionalFile>
|
||||
<AdditionalFile owner="root" permission="0644" target="/usr/lib/pisilinux/pisi/actionsapi/mesontools.py">mesontools.py</AdditionalFile>
|
||||
</AdditionalFiles>
|
||||
<Provides>
|
||||
<COMAR script="package.py">System.Package</COMAR>
|
||||
@@ -81,6 +71,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="13">
|
||||
<Date>2020-01-10</Date>
|
||||
<Version>2.7.1</Version>
|
||||
<Comment>Version bump</Comment>
|
||||
<Name>Safa Arıman</Name>
|
||||
<Email>safa@ariman.gen.tr</Email>
|
||||
</Update>
|
||||
<Update release="12">
|
||||
<Date>2020-01-08</Date>
|
||||
<Version>2.7</Version>
|
||||
|
||||
Reference in New Issue
Block a user