From 5661637eae0050665d605131ebb480f5576d423b47035cac17127b8023ae2bbc Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Tue, 10 Dec 2024 11:25:51 +0000 Subject: [PATCH 1/2] osc copypac from project:devel:languages:haskell:ghc-9.10.x package:ShellCheck revision:4, using keep-link OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/ShellCheck?expand=0&rev=97 --- .gitattributes | 23 ++++ .gitignore | 1 + ShellCheck-0.10.0.tar.gz | 3 + ShellCheck.cabal | 147 ++++++++++++++++++++++ ShellCheck.changes | 255 +++++++++++++++++++++++++++++++++++++++ ShellCheck.spec | 151 +++++++++++++++++++++++ _constraints | 38 ++++++ 7 files changed, 618 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 ShellCheck-0.10.0.tar.gz create mode 100644 ShellCheck.cabal create mode 100644 ShellCheck.changes create mode 100644 ShellCheck.spec create mode 100644 _constraints diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/ShellCheck-0.10.0.tar.gz b/ShellCheck-0.10.0.tar.gz new file mode 100644 index 0000000..39bd3f1 --- /dev/null +++ b/ShellCheck-0.10.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4d08db432d75a34486a55f6fff9d3e3340ce56125c7804b7f8fd14421b936d21 +size 234856 diff --git a/ShellCheck.cabal b/ShellCheck.cabal new file mode 100644 index 0000000..26efeae --- /dev/null +++ b/ShellCheck.cabal @@ -0,0 +1,147 @@ +Name: ShellCheck +Version: 0.10.0 +x-revision: 1 +Synopsis: Shell script analysis tool +License: GPL-3 +License-file: LICENSE +Category: Static Analysis +Author: Vidar Holen +Maintainer: vidar@vidarholen.net +Homepage: https://www.shellcheck.net/ +Build-Type: Simple +Cabal-Version: 1.18 +Bug-reports: https://github.com/koalaman/shellcheck/issues +Description: + The goals of ShellCheck are: + . + * To point out and clarify typical beginner's syntax issues, + that causes a shell to give cryptic error messages. + . + * To point out and clarify typical intermediate level semantic problems, + that causes a shell to behave strangely and counter-intuitively. + . + * To point out subtle caveats, corner cases and pitfalls, that may cause an + advanced user's otherwise working script to fail under future circumstances. + +Extra-Doc-Files: + README.md + CHANGELOG.md +Extra-Source-Files: + -- documentation + shellcheck.1.md + -- A script to build the man page using pandoc + manpage + -- convenience script for stripping tests + striptests + -- tests + test/shellcheck.hs + +source-repository head + type: git + location: git://github.com/koalaman/shellcheck.git + +library + hs-source-dirs: src + if impl(ghc < 8.0) + build-depends: + semigroups + build-depends: + -- The lower bounds are based on GHC 7.10.3 + -- The upper bounds are based on GHC 9.8.1 + aeson >= 1.4.0 && < 2.3, + array >= 0.5.1 && < 0.6, + base >= 4.8.0.0 && < 5, + bytestring >= 0.10.6 && < 0.13, + containers >= 0.5.6 && < 0.8, + deepseq >= 1.4.1 && < 1.6, + Diff >= 0.4.0 && < 1.1, + fgl (>= 5.7.0 && < 5.8.1.0) || (>= 5.8.1.1 && < 5.9), + filepath >= 1.4.0 && < 1.6, + mtl >= 2.2.2 && < 2.4, + parsec >= 3.1.14 && < 3.2, + QuickCheck >= 2.14.2 && < 2.16, + regex-tdfa >= 1.2.0 && < 1.4, + transformers >= 0.4.2 && < 0.7, + + -- getXdgDirectory from 1.2.3.0 + directory >= 1.2.3 && < 1.4, + + -- When cabal supports it, move this to setup-depends: + process + exposed-modules: + ShellCheck.AST + ShellCheck.ASTLib + ShellCheck.Analytics + ShellCheck.Analyzer + ShellCheck.AnalyzerLib + ShellCheck.CFG + ShellCheck.CFGAnalysis + ShellCheck.Checker + ShellCheck.Checks.Commands + ShellCheck.Checks.ControlFlow + ShellCheck.Checks.Custom + ShellCheck.Checks.ShellSupport + ShellCheck.Data + ShellCheck.Debug + ShellCheck.Fixer + ShellCheck.Formatter.Format + ShellCheck.Formatter.CheckStyle + ShellCheck.Formatter.Diff + ShellCheck.Formatter.GCC + ShellCheck.Formatter.JSON + ShellCheck.Formatter.JSON1 + ShellCheck.Formatter.TTY + ShellCheck.Formatter.Quiet + ShellCheck.Interface + ShellCheck.Parser + ShellCheck.Prelude + ShellCheck.Regex + other-modules: + Paths_ShellCheck + default-language: Haskell98 + +executable shellcheck + if impl(ghc < 8.0) + build-depends: + semigroups + build-depends: + aeson, + array, + base, + bytestring, + containers, + deepseq, + Diff, + directory, + fgl, + mtl, + filepath, + parsec, + QuickCheck, + regex-tdfa, + transformers, + ShellCheck + default-language: Haskell98 + main-is: shellcheck.hs + +test-suite test-shellcheck + type: exitcode-stdio-1.0 + build-depends: + aeson, + array, + base, + bytestring, + containers, + deepseq, + Diff, + directory, + fgl, + filepath, + mtl, + parsec, + QuickCheck, + regex-tdfa, + transformers, + ShellCheck + default-language: Haskell98 + main-is: test/shellcheck.hs \ No newline at end of file diff --git a/ShellCheck.changes b/ShellCheck.changes new file mode 100644 index 0000000..5663158 --- /dev/null +++ b/ShellCheck.changes @@ -0,0 +1,255 @@ +------------------------------------------------------------------- +Tue Dec 3 02:30:34 UTC 2024 - Peter Simons + +- Update ShellCheck to version 0.10.0 revision 1. + Upstream has revised the Cabal build instructions on Hackage. + +------------------------------------------------------------------- +Fri Mar 8 02:49:11 UTC 2024 - Peter Simons + +- Update ShellCheck to version 0.10.0. + ## v0.10.0 - 2024-03-07 + ### Added + - Precompiled binaries for macOS ARM64 (darwin.aarch64) + - Added support for busybox sh + - Added flag --rcfile to specify an rc file by name. + - Added `extended-analysis=true` directive to enable/disable dataflow analysis + (with a corresponding --extended-analysis flag). + - SC2324: Warn when x+=1 appends instead of increments + - SC2325: Warn about multiple `!`s in dash/sh. + - SC2326: Warn about `foo | ! bar` in bash/dash/sh. + - SC3012: Warn about lexicographic-compare bashism in test like in [ ] + - SC3013: Warn bashism `test _ -op/-nt/-ef _` like in [ ] + - SC3014: Warn bashism `test _ == _` like in [ ] + - SC3015: Warn bashism `test _ =~ _` like in [ ] + - SC3016: Warn bashism `test -v _` like in [ ] + - SC3017: Warn bashism `test -a _` like in [ ] + + ### Fixed + - source statements with here docs now work correctly + - "(Array.!): undefined array element" error should no longer occur + +------------------------------------------------------------------- +Thu Mar 30 17:09:20 UTC 2023 - Peter Simons + +- Updated spec file to conform with ghc-rpm-macros-2.5.2. + +------------------------------------------------------------------- +Sat Feb 4 20:03:02 UTC 2023 - Peter Simons + +- Update ShellCheck to version 0.9.0 revision 1. + Upstream has revised the Cabal build instructions on Hackage. + +------------------------------------------------------------------- +Tue Dec 13 07:09:04 UTC 2022 - Peter Simons + +- Update ShellCheck to version 0.9.0. + ## v0.9.0 - 2022-12-12 + ### Added + - SC2316: Warn about 'local readonly foo' and similar (thanks, patrickxia!) + - SC2317: Warn about unreachable commands + - SC2318: Warn about backreferences in 'declare x=1 y=$x' + - SC2319/SC2320: Warn when $? refers to echo/printf/[ ]/[[ ]]/test + - SC2321: Suggest removing $((..)) in array[$((idx))]=val + - SC2322: Suggest collapsing double parentheses in arithmetic contexts + - SC2323: Suggest removing wrapping parentheses in a[(x+1)]=val + + ### Fixed + - SC2086: Now uses DFA to make more accurate predictions about values + - SC2086: No longer warns about values declared as integer with declare -i + + ### Changed + - ShellCheck now has a Data Flow Analysis engine to make smarter decisions + based on control flow rather than just syntax. Existing checks will + gradually start using it, which may cause them to trigger differently + (but more accurately). + - Values in directives/shellcheckrc can now be quoted with '' or "" + +------------------------------------------------------------------- +Thu May 19 23:17:38 UTC 2022 - Peter Simons + +- Update ShellCheck to version 0.8.0 revision 1. + Upstream has revised the Cabal build instructions on Hackage. + +------------------------------------------------------------------- +Sun Nov 7 14:54:02 UTC 2021 - psimons@suse.com + +- Update ShellCheck to version 0.8.0. +- drop haddock.patch + Upstream added a new change log file in this release. With no + previous version to compare against, the automatic updater cannot + reliable determine the relevante entries for this release. + +------------------------------------------------------------------- +Fri Apr 23 11:05:19 UTC 2021 - Ondřej Súkup + +- add haddock.patch to fix build with haddock + +------------------------------------------------------------------- +Thu Apr 22 10:06:05 UTC 2021 - psimons@suse.com + +- Update ShellCheck to version 0.7.2. + Upstream does not provide a change log file. + +------------------------------------------------------------------- +Thu Dec 17 12:20:00 UTC 2020 - Ondřej Súkup + +- disable %{ix86} build + +------------------------------------------------------------------- +Tue Aug 18 10:43:41 UTC 2020 - Peter Simons + +- Replace %setup -q with the more modern %autosetup macro. + +------------------------------------------------------------------- +Tue Aug 4 13:27:52 UTC 2020 - Michel Normand + +- Add _constraints default min disk space to 4GB and + memory constraints that differ per architecture. + +------------------------------------------------------------------- +Tue Jun 16 11:13:33 UTC 2020 - Peter Simons + +- Re-generate file with latest version of spec-cleaner. + +------------------------------------------------------------------- +Wed May 6 06:54:13 UTC 2020 - psimons@suse.com + +- Update ShellCheck to version 0.7.1. + Upstream does not provide a change log file. + +------------------------------------------------------------------- +Wed Jan 1 10:05:21 UTC 2020 - Peter Simons + +- Drop bogus Setup.hs file to let the build succeed with ghc-8.8.x. +- Fix download URL. + +------------------------------------------------------------------- +Fri Nov 8 16:15:21 UTC 2019 - Peter Simons + +- Drop obsolete group attributes. + +------------------------------------------------------------------- +Tue Jul 30 02:01:42 UTC 2019 - psimons@suse.com + +- Update ShellCheck to version 0.7.0. + Upstream does not provide a change log file. + +------------------------------------------------------------------- +Tue Dec 4 03:02:12 UTC 2018 - psimons@suse.com + +- Update ShellCheck to version 0.6.0. + Upstream does not provide a change log file. + +------------------------------------------------------------------- +Mon Oct 15 16:52:08 UTC 2018 - psimons@suse.com + +- Update to version v0.5.0-81-ge0e46e9 from Github to fix the build + with GHC 8.6.x. + + * Added + Command line option --severity/-S for filtering by minimum severity + SC2236/SC2237: Suggest -n/-z instead of ! -z/-n + SC2238: Warn when redirecting to a known command name, e.g. ls > rm + + * Changed + Most warnings now have useful end positions + SC1117 about unknown double-quoted escape sequences has been retired + + * Fixed + SC2021 no longer triggers for equivalence classes like '[=e=]' + SC2221/SC2222 no longer mistriggers on fall-through case branches + +------------------------------------------------------------------- +Wed Jul 18 14:26:08 UTC 2018 - psimons@suse.com + +- Cosmetic: replace tabs with blanks, strip trailing white space, + and update copyright headers with spec-cleaner. + +------------------------------------------------------------------- +Fri Jul 13 14:31:59 UTC 2018 - psimons@suse.com + +- Update ShellCheck to version 0.5.0. + * Added SC2233/SC2234/SC2235: Suggest removing or replacing (..) around tests + +------------------------------------------------------------------- +Wed May 16 14:36:30 UTC 2018 - psimons@suse.com + +- Update to version v0.4.7-106-g235bf66 from Github to fix the + build with GHC 8.4.x. + + * Added: + SC2232: Warn about invalid arguments to sudo + SC2231: Suggest quoting expansions in for loop globs + SC2229: Warn about 'read $var' + SC2227: Warn about redirections in the middle of 'find' commands + SC2224,SC2225,SC2226: Warn when using mv/cp/ln without a destination + SC2223: Quote warning specific to : ${var=value} + SC1131: Warn when using elseif or elsif + SC1128: Warn about blanks/comments before shebang + SC1127: Warn about C-style comments + + * Fixed: + Annotations intended for a command's here documents now work + Escaped characters inside groups in =~ regexes now parse + Associative arrays are now respected in arithmetic contexts + SC1087 about $var[@] now correctly triggers on any index + Bad expansions in here documents are no longer ignored + FD move operations like {fd}>1- now parse correctly + + * Changed: + SC1073: 'else if' is now parsed correctly and not like 'elif' + SC2163: 'export $name' can now be silenced with 'export ${name?}' + SC2183: Now warns when printf arg count is not a multiple of format count + +------------------------------------------------------------------- +Thu Apr 12 10:15:44 UTC 2018 - guillaume@opensuse.org + +- Add _constraints to avoid OOM error with a special case for + aarch64 which needs lots of RAM. + +------------------------------------------------------------------- +Thu Apr 12 08:31:43 UTC 2018 - psimons@suse.com + +- Update ShellCheck to version 0.4.7 revision 1. + A more detailed change log is not available. + +------------------------------------------------------------------- +Thu Aug 3 15:38:38 UTC 2017 - psimons@suse.com + +- Updated with latest spec-cleaner version 0.9.8-8-geadfbbf. + +------------------------------------------------------------------- +Mon Mar 27 12:41:06 UTC 2017 - psimons@suse.com + +- Update to version 0.4.6 with cabal2obs. + +------------------------------------------------------------------- +Sun Feb 12 14:19:35 UTC 2017 - psimons@suse.com + +- Update to version 0.4.5 with cabal2obs. + +------------------------------------------------------------------- +Sun Jul 10 17:33:18 UTC 2016 - psimons@suse.com + +- Update to version 0.4.4 revision 0 with cabal2obs. + +------------------------------------------------------------------- +Sat May 21 15:40:14 UTC 2016 - mimi.vx@gmail.com + +- update to 0.4.4 + +------------------------------------------------------------------- +Sun Jan 24 12:56:34 UTC 2016 - mimi.vx@gmail.com + +- update to 0.4.3 + +------------------------------------------------------------------- +Tue Jan 12 09:19:42 UTC 2016 - mimi.vx@gmail.com + +- update to 0.4.2 + +------------------------------------------------------------------- +Sun Sep 6 13:59:34 UTC 2015 - mimi.vx@gmail.com + +- initial commit diff --git a/ShellCheck.spec b/ShellCheck.spec new file mode 100644 index 0000000..3995fce --- /dev/null +++ b/ShellCheck.spec @@ -0,0 +1,151 @@ +# +# spec file for package ShellCheck +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%global pkg_name ShellCheck +%global pkgver %{pkg_name}-%{version} +%bcond_with tests +Name: %{pkg_name} +Version: 0.10.0 +Release: 0 +Summary: Shell script analysis tool +License: GPL-3.0-or-later +URL: https://hackage.haskell.org/package/%{name} +Source0: https://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.tar.gz +Source1: https://hackage.haskell.org/package/%{name}-%{version}/revision/1.cabal#/%{name}.cabal +BuildRequires: chrpath +BuildRequires: ghc-Cabal-devel +BuildRequires: ghc-Diff-devel +BuildRequires: ghc-Diff-prof +BuildRequires: ghc-QuickCheck-devel +BuildRequires: ghc-QuickCheck-prof +BuildRequires: ghc-aeson-devel +BuildRequires: ghc-aeson-prof +BuildRequires: ghc-array-devel +BuildRequires: ghc-array-prof +BuildRequires: ghc-base-devel +BuildRequires: ghc-base-prof +BuildRequires: ghc-bytestring-devel +BuildRequires: ghc-bytestring-prof +BuildRequires: ghc-containers-devel +BuildRequires: ghc-containers-prof +BuildRequires: ghc-deepseq-devel +BuildRequires: ghc-deepseq-prof +BuildRequires: ghc-directory-devel +BuildRequires: ghc-directory-prof +BuildRequires: ghc-fgl-devel +BuildRequires: ghc-fgl-prof +BuildRequires: ghc-filepath-devel +BuildRequires: ghc-filepath-prof +BuildRequires: ghc-mtl-devel +BuildRequires: ghc-mtl-prof +BuildRequires: ghc-parsec-devel +BuildRequires: ghc-parsec-prof +BuildRequires: ghc-process-devel +BuildRequires: ghc-process-prof +BuildRequires: ghc-regex-tdfa-devel +BuildRequires: ghc-regex-tdfa-prof +BuildRequires: ghc-rpm-macros +BuildRequires: ghc-transformers-devel +BuildRequires: ghc-transformers-prof +BuildRequires: pandoc-cli +ExcludeArch: %{ix86} + +%description +The goals of ShellCheck are: + +* To point out and clarify typical beginner's syntax issues, that causes a +shell to give cryptic error messages. + +* To point out and clarify typical intermediate level semantic problems, that +causes a shell to behave strangely and counter-intuitively. + +* To point out subtle caveats, corner cases and pitfalls, that may cause an +advanced user's otherwise working script to fail under future circumstances. + +%package -n ghc-%{name} +Summary: Haskell %{name} library + +%description -n ghc-%{name} +This package provides the Haskell %{name} shared library. + +%package -n ghc-%{name}-devel +Summary: Haskell %{name} library development files +Requires: ghc-%{name} = %{version}-%{release} +Requires: ghc-compiler = %{ghc_version} +Requires(post): ghc-compiler = %{ghc_version} +Requires(postun): ghc-compiler = %{ghc_version} + +%description -n ghc-%{name}-devel +This package provides the Haskell %{name} library development files. + +%package -n ghc-%{pkg_name}-doc +Summary: Haskell %{pkg_name} library documentation +Requires: ghc-filesystem +BuildArch: noarch + +%description -n ghc-%{pkg_name}-doc +This package provides the Haskell %{pkg_name} library documentation. + +%package -n ghc-%{pkg_name}-prof +Summary: Haskell %{pkg_name} profiling library +Requires: ghc-%{pkg_name}-devel = %{version}-%{release} +Supplements: (ghc-%{pkg_name}-devel and ghc-prof) + +%description -n ghc-%{pkg_name}-prof +This package provides the Haskell %{pkg_name} profiling library. + +%prep +%autosetup +cp -p %{SOURCE1} %{name}.cabal + +%build +%ghc_lib_build + +%install +%ghc_lib_install +%ghc_fix_rpath %{pkg_name}-%{version} +pandoc -s -f markdown-smart -t man shellcheck.1.md -o shellcheck.1 +install -Dpm 0644 shellcheck.1 %{buildroot}%{_mandir}/man1/shellcheck.1 + +%check +%cabal_test + +%post -n ghc-%{name}-devel +%ghc_pkg_recache + +%postun -n ghc-%{name}-devel +%ghc_pkg_recache + +%files +%license LICENSE +%doc CHANGELOG.md README.md +%{_bindir}/shellcheck +%{_mandir}/man1/shellcheck.1%{?ext_man} + +%files -n ghc-%{name} -f ghc-%{name}.files +%license LICENSE + +%files -n ghc-%{name}-devel -f ghc-%{name}-devel.files +%doc CHANGELOG.md README.md + +%files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files +%license LICENSE + +%files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files + +%changelog diff --git a/_constraints b/_constraints new file mode 100644 index 0000000..6cd9201 --- /dev/null +++ b/_constraints @@ -0,0 +1,38 @@ + + + + 4600 + + + + + aarch64 + + + + 6 + + + + + + ppc64 + ppc64le + + + + 4 + + + + + + s390x + + + + 9 + + + + From 1479e182c63451446a6d6cbe9cf029c37b04d7e8c1b5f5a71ad9305e57e9e8c2 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Mon, 16 Dec 2024 07:50:42 +0000 Subject: [PATCH 2/2] osc copypac from project:devel:languages:haskell:ghc-9.10.x package:ShellCheck revision:5, using keep-link OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/ShellCheck?expand=0&rev=98