Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package felix-gogo-shell for
openSUSE:Factory checked in at 2023-01-17 17:35:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/felix-gogo-shell (Old)
and /work/SRC/openSUSE:Factory/.felix-gogo-shell.new.32243 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "felix-gogo-shell"
Tue Jan 17 17:35:52 2023 rev:4 rq:1058902 version:1.1.4
Changes:
--------
--- /work/SRC/openSUSE:Factory/felix-gogo-shell/felix-gogo-shell.changes
2019-11-26 16:56:54.228156524 +0100
+++
/work/SRC/openSUSE:Factory/.felix-gogo-shell.new.32243/felix-gogo-shell.changes
2023-01-17 17:36:00.133418103 +0100
@@ -1,0 +2,12 @@
+Thu Dec 29 18:56:02 UTC 2022 - Dirk Müller <[email protected]>
+
+- update to 1.1.4:
+ [FELIX-6038] - pull Java 7 support back in for gogo runtime,shell and console
+ [FELIX-6046] - fix gogo shell thread interrupt.
+ [FELIX-5970] - Add requirement & capabilities model so gogo can be resolved
+ [FELIX-5999] - cleanup compiler warnings
+ [FELIX-6000] - cleanup compiler warnings
+ [FELIX-6003] - Add some resolver checks to make sure @RequireGogo annotation
works for both jline and shell
+ [FELIX-6007] - create a gogo bom
+
+-------------------------------------------------------------------
Old:
----
org.apache.felix.gogo.shell-1.1.0-source-release.tar.gz
New:
----
org.apache.felix.gogo.shell-1.1.4-source-release.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ felix-gogo-shell.spec ++++++
--- /var/tmp/diff_new_pack.kFh31o/_old 2023-01-17 17:36:00.765421667 +0100
+++ /var/tmp/diff_new_pack.kFh31o/_new 2023-01-17 17:36:00.769421689 +0100
@@ -1,7 +1,7 @@
#
# spec file for package felix-gogo-shell
#
-# Copyright (c) 2019 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,13 +18,13 @@
%global bundle org.apache.felix.gogo.shell
Name: felix-gogo-shell
-Version: 1.1.0
+Version: 1.1.4
Release: 0
Summary: Apache Felix Gogo command line shell for OSGi
License: Apache-2.0
Group: Development/Libraries/Java
-URL:
http://felix.apache.org/documentation/subprojects/apache-felix-gogo.html
-Source0:
http://archive.apache.org/dist/felix/%{bundle}-%{version}-source-release.tar.gz
+URL:
https://felix.apache.org/documentation/subprojects/apache-felix-gogo.html
+Source0:
https://archive.apache.org/dist/felix/%{bundle}-%{version}-source-release.tar.gz
BuildRequires: fdupes
BuildRequires: maven-local
BuildRequires: mvn(org.apache.felix:gogo-parent:pom:) >= 4
@@ -60,7 +60,7 @@
%endif
%install
-%mvn_install
+%{mvn_install}
%fdupes -s %{buildroot}%{_javadocdir}
%files -f .mfiles
++++++ org.apache.felix.gogo.shell-1.1.0-source-release.tar.gz ->
org.apache.felix.gogo.shell-1.1.4-source-release.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/org.apache.felix.gogo.shell-1.1.0/doc/changelog.txt
new/org.apache.felix.gogo.shell-1.1.4/doc/changelog.txt
--- old/org.apache.felix.gogo.shell-1.1.0/doc/changelog.txt 2018-06-14
20:38:34.000000000 +0200
+++ new/org.apache.felix.gogo.shell-1.1.4/doc/changelog.txt 2020-10-05
18:20:45.000000000 +0200
@@ -1,12 +1,49 @@
+Changes from 1.1.2 to 1.1.4
+----------------------------
+Improvement
+ [FELIX-6038] - pull Java 7 support back in for gogo runtime,shell and
console
+
+Bug
+ [FELIX-6046] - fix gogo shell thread interrupt.
+
+Changes from 1.1.0 to 1.1.2
+----------------------------
+Improvement
+ [FELIX-5970] - Add requirement & capabilities model so gogo can be resolved
+ [FELIX-5999] - cleanup compiler warnings
+ [FELIX-6000] - cleanup compiler warnings
+ [FELIX-6003] - Add some resolver checks to make sure @RequireGogo
annotation works for both jline and shell
+ [FELIX-6007] - create a gogo bom
+
+Changes from 1.0.0 to 1.1.0
+----------------------------
+New Feature
+ [FELIX-5835] - Upgrade to JDK 8
+ [FELIX-5836] - Upgrade to OSGi r6
+
+Improvement
+ [FELIX-5857] - Provide a context classloader on the session to help with
class loading
+
+Changes from 0.12.0 to 1.0.0
+----------------------------
+New Feature
+ [FELIX-5272] - New gogo features
+
+Improvement
+ [FELIX-2536] - Gogo Shell should export org.apache.felix.gogo.options
package
+
+Task
+ [FELIX-5378] - [gogo] Upgrade packages and bundle to 1.0.0
+
Changes from 0.10.0 to 0.12.0
-----------------------------
-** Improvement
+** Improvement
* FELIX-5021 [GOGO] Use system bundle to find bundles
* FELIX-4529 [Gogo] Let gosh be configured by files contributed by a
bundle fragment
* FELIX-3341 Simple csh-like Command History
* FELIX-3340 Allow the prompt to be a Function
-** Bug
+** Bug
* FELIX-4425 Short command in Gogo Shell not working with Java 8
* FELIX-3706 gogo shell startup failure in busy system
* FELIX-3703 Race condition in gogo runtime activator
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/org.apache.felix.gogo.shell-1.1.0/pom.xml
new/org.apache.felix.gogo.shell-1.1.4/pom.xml
--- old/org.apache.felix.gogo.shell-1.1.0/pom.xml 2018-06-14
20:38:34.000000000 +0200
+++ new/org.apache.felix.gogo.shell-1.1.4/pom.xml 2020-10-05
18:20:45.000000000 +0200
@@ -1,101 +1,95 @@
-<!-- Licensed to the Apache Software Foundation (ASF) under one or more
contributor
- license agreements. See the NOTICE file distributed with this work for
additional
- information regarding copyright ownership. The ASF licenses this file
to
- you under the Apache License, Version 2.0 (the "License"); you may not
use
- this file except in compliance with the License. You may obtain a copy
of
- the License at http://www.apache.org/licenses/LICENSE-2.0 Unless
required
- by applicable law or agreed to in writing, software distributed under
the
- License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS
- OF ANY KIND, either express or implied. See the License for the
specific
- language governing permissions and limitations under the License. -->
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <groupId>org.apache.felix</groupId>
- <artifactId>gogo-parent</artifactId>
- <version>4</version>
- <relativePath>../gogo-parent/pom.xml</relativePath>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <packaging>bundle</packaging>
- <name>Apache Felix Gogo Shell</name>
- <artifactId>org.apache.felix.gogo.shell</artifactId>
- <version>1.1.0</version>
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>gogo-parent</artifactId>
+ <version>6</version>
+ <relativePath>../gogo-parent/pom.xml</relativePath>
+ </parent>
+
+ <packaging>bundle</packaging>
+ <name>Apache Felix Gogo Shell</name>
+ <artifactId>org.apache.felix.gogo.shell</artifactId>
+ <version>1.1.4</version>
+ <url>http://felix.apache.org/</url>
<scm>
-
<connection>scm:svn:http://svn.apache.org/repos/asf/felix/releases/org.apache.felix.gogo.shell-1.1.0</connection>
-
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/felix/releases/org.apache.felix.gogo.shell-1.1.0</developerConnection>
-
<url>scm:svn:https://svn.apache.org/repos/asf/felix/releases/org.apache.felix.gogo.shell-1.1.0</url>
- </scm>
- <dependencies>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>osgi.core</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>osgi.cmpn</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.gogo.runtime</artifactId>
- <version>1.1.0</version>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Export-Package>
- </Export-Package>
- <Import-Package>
-
org.apache.felix.service.command,
- *
- </Import-Package>
- <Private-Package>
-
org.apache.felix.gogo.shell,
-
org.apache.felix.gogo.options
- </Private-Package>
-
<Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
- <Bundle-Vendor>The Apache
Software Foundation</Bundle-Vendor>
-
<Bundle-Activator>org.apache.felix.gogo.shell.Activator</Bundle-Activator>
-
<Include-Resource>{maven-resources},META-INF/LICENSE=LICENSE,META-INF/NOTICE=NOTICE,META-INF/DEPENDENCIES=DEPENDENCIES</Include-Resource>
-
<_versionpolicy>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy>
-
<_removeheaders>Private-Package,Ignore-Package,Include-Resource</_removeheaders>
- </instructions>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.rat</groupId>
- <artifactId>apache-rat-plugin</artifactId>
- <configuration>
-
<excludeSubProjects>false</excludeSubProjects>
-
<useEclipseDefaultExcludes>true</useEclipseDefaultExcludes>
-
<useMavenDefaultExcludes>true</useMavenDefaultExcludes>
- <excludes>
- <param>doc/*</param>
- <param>maven-eclipse.xml</param>
- <param>.checkstyle</param>
-
<param>.externalToolBuilders/*</param>
-
<param>src/main/resources/gosh_profile</param>
-
<param>src/main/resources/motd</param>
- </excludes>
- </configuration>
- </plugin>
- </plugins>
- </build>
+
<connection>scm:git:https://github.com/apache/felix-dev.git</connection>
+
<developerConnection>scm:git:https://github.com/apache/felix-dev.git</developerConnection>
+ <url>https://gitbox.apache.org/repos/asf?p=felix-dev.git</url>
+ <tag>org.apache.felix.gogo.shell-1.1.4</tag>
+ </scm>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>osgi.annotation</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>osgi.core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.gogo.runtime</artifactId>
+ <version>1.1.4</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-core</artifactId>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <configuration>
+ <instructions>
+ <Export-Package />
+ </instructions>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.rat</groupId>
+ <artifactId>apache-rat-plugin</artifactId>
+ <configuration>
+ <excludeSubProjects>false</excludeSubProjects>
+ <useEclipseDefaultExcludes>true</useEclipseDefaultExcludes>
+ <useMavenDefaultExcludes>true</useMavenDefaultExcludes>
+ <excludes>
+ <param>doc/*</param>
+ <param>maven-eclipse.xml</param>
+ <param>.checkstyle</param>
+ <param>.externalToolBuilders/*</param>
+ <param>src/main/resources/motd</param>
+ </excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</project>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/org.apache.felix.gogo.shell-1.1.0/src/main/java/org/apache/felix/gogo/options/Option.java
new/org.apache.felix.gogo.shell-1.1.4/src/main/java/org/apache/felix/gogo/options/Option.java
---
old/org.apache.felix.gogo.shell-1.1.0/src/main/java/org/apache/felix/gogo/options/Option.java
2018-06-14 20:38:34.000000000 +0200
+++
new/org.apache.felix.gogo.shell-1.1.4/src/main/java/org/apache/felix/gogo/options/Option.java
2020-10-05 18:20:45.000000000 +0200
@@ -24,67 +24,76 @@
/**
* stop parsing on the first unknown option. This allows one parser to get
its own options and
* then pass the remaining options to another parser.
- *
- * @param stopOnBadOption
+ *
+ * @param stopOnBadOption stopOnBadOption
+ * @return Option
*/
Option setStopOnBadOption(boolean stopOnBadOption);
/**
* require options to precede args. Default is false, so options can
appear between or after
* args.
- *
- * @param optionsFirst
+ *
+ * @param optionsFirst optionsFirst
+ * @return Option
*/
Option setOptionsFirst(boolean optionsFirst);
/**
* parse arguments. If skipArgv0 is true, then parsing begins at arg1.
This allows for commands
* where argv0 is the command name rather than a real argument.
- *
- * @param argv
- * @param skipArg0
- * @return
+ *
+ * @param argv argv
+ * @param skipArg0 skipArg0
+ * @return Option
*/
Option parse(List<?> argv, boolean skipArg0);
/**
* parse arguments.
- *
- * @see {@link #parse(List, boolean)
-
+ *
+ * See {@link #parse(List, boolean)}
+ *
+ * @param argv the arg
+ * @return Option
*/
Option parse(List<?> argv);
/**
* parse arguments.
- *
- * @see {@link #parse(List, boolean)
-
+ *
+ * See {@link #parse(List, boolean)}
+ *
+ * @param argv the arg
+ * @param skipArg0 skipArg0
+ * @return Option
*/
Option parse(Object[] argv, boolean skipArg0);
/**
* parse arguments.
- *
- * @see {@link #parse(List, boolean)
-
+ *
+ * See {@link #parse(List, boolean)}
+ *
+ * @param argv argv
+ * @return Option
*/
Option parse(Object[] argv);
/**
* test whether specified option has been explicitly set.
- *
- * @param name
- * @return
+ *
+ * @param name name
+ * @return boolean
*/
boolean isSet(String name);
/**
* get value of named option. If multiple options given, this method
returns the last one. Use
* {@link #getList(String)} to get all values.
- *
- * @param name
- * @return
+ *
+ * @param name the name
+ * @return String
* @throws IllegalArgumentException
* if value is not a String.
*/
@@ -92,8 +101,8 @@
/**
* get list of all values for named option.
- *
- * @param name
+ *
+ * @param name the name
* @return empty list if option not given and no default specified.
* @throws IllegalArgumentException
* if all values are not Strings.
@@ -103,25 +112,25 @@
/**
* get value of named option as an Object. If multiple options given, this
method returns the
* last one. Use {@link #getObjectList(String)} to get all values.
- *
- * @param name
- * @return
+ *
+ * @param name the name
+ * @return Object
*/
Object getObject(String name);
/**
* get list of all Object values for named option.
- *
- * @param name
- * @return
+ *
+ * @param name the name
+ * @return List<Object>
*/
List<Object> getObjectList(String name);
/**
* get value of named option as a Number.
- *
- * @param name
- * @return
+ *
+ * @param name the name
+ * @return int
* @throws IllegalArgumentException
* if argument is not a Number.
*/
@@ -129,8 +138,8 @@
/**
* get remaining non-options args as Strings.
- *
- * @return
+ *
+ * @return List<String>
* @throws IllegalArgumentException
* if args are not Strings.
*/
@@ -138,8 +147,8 @@
/**
* get remaining non-options args as Objects.
- *
- * @return
+ *
+ * @return List<Object>
*/
List<Object> argObjects();
@@ -151,8 +160,8 @@
/**
* print specified usage error to System.err. You should explicitly throw
the returned
* exception.
- *
- * @param error
+ *
+ * @param error the error
* @return IllegalArgumentException
*/
IllegalArgumentException usageError(String error);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/org.apache.felix.gogo.shell-1.1.0/src/main/java/org/apache/felix/gogo/options/Options.java
new/org.apache.felix.gogo.shell-1.1.4/src/main/java/org/apache/felix/gogo/options/Options.java
---
old/org.apache.felix.gogo.shell-1.1.0/src/main/java/org/apache/felix/gogo/options/Options.java
2018-06-14 20:38:34.000000000 +0200
+++
new/org.apache.felix.gogo.shell-1.1.4/src/main/java/org/apache/felix/gogo/options/Options.java
2020-10-05 18:20:45.000000000 +0200
@@ -469,7 +469,7 @@
public Option parse(List<?> argv, boolean skipArg0)
{
reset();
- List<Object> args = new ArrayList<>(Arrays.asList(defArgs));
+ List<Object> args = new ArrayList<Object>(Arrays.asList(defArgs));
for (Object arg : argv)
{
if (skipArg0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/org.apache.felix.gogo.shell-1.1.0/src/main/java/org/apache/felix/gogo/shell/Activator.java
new/org.apache.felix.gogo.shell-1.1.4/src/main/java/org/apache/felix/gogo/shell/Activator.java
---
old/org.apache.felix.gogo.shell-1.1.0/src/main/java/org/apache/felix/gogo/shell/Activator.java
2018-06-14 20:38:34.000000000 +0200
+++
new/org.apache.felix.gogo.shell-1.1.4/src/main/java/org/apache/felix/gogo/shell/Activator.java
2020-10-05 18:20:45.000000000 +0200
@@ -35,17 +35,20 @@
import org.apache.felix.service.command.CommandProcessor;
import org.apache.felix.service.command.CommandSession;
import org.apache.felix.service.command.Converter;
+import org.osgi.annotation.bundle.Header;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
+import org.osgi.framework.Constants;
import org.osgi.framework.ServiceReference;
import org.osgi.framework.ServiceRegistration;
import org.osgi.util.tracker.ServiceTracker;
+@Header(name = Constants.BUNDLE_ACTIVATOR, value = "${@class}")
public class Activator implements BundleActivator
{
private BundleContext context;
- private ServiceTracker commandProcessorTracker;
- private Set<ServiceRegistration> regs;
+ private ServiceTracker<?,?> commandProcessorTracker;
+ private Set<ServiceRegistration<?>> regs;
private volatile ExecutorService executor;
private volatile StartShellJob shellJob;
@@ -62,14 +65,14 @@
}
public void stop(BundleContext context) {
- Set<ServiceRegistration> currentRegs;
+ Set<ServiceRegistration<?>> currentRegs;
synchronized (regs)
{
currentRegs = new HashSet<>(regs);
regs.clear();
}
- for (ServiceRegistration reg : currentRegs)
+ for (ServiceRegistration<?> reg : currentRegs)
{
reg.unregister();
}
@@ -105,7 +108,7 @@
Dictionary<String, Object> dict = new Hashtable<>();
dict.put(CommandProcessor.COMMAND_SCOPE, "gogo");
- Set<ServiceRegistration> currentRegs = new HashSet<>();
+ Set<ServiceRegistration<?>> currentRegs = new HashSet<>();
// register converters
currentRegs.add(context.registerService(Converter.class.getName(), new
Converters(context.getBundle(0).getBundleContext()), null));
@@ -135,7 +138,12 @@
}
// start shell on a separate thread...
- executor = Executors.newSingleThreadExecutor(runnable -> new
Thread(runnable, "Gogo shell"));
+ executor = Executors.newSingleThreadExecutor(new ThreadFactory() {
+ @Override
+ public Thread newThread(Runnable runnable) {
+ return new Thread(runnable, "Gogo shell");
+ }
+ });
shellJob = new StartShellJob(context, processor);
executor.submit(shellJob);
}
@@ -177,6 +185,8 @@
private final BundleContext context;
private final CommandProcessor processor;
private volatile CommandSession session;
+ private volatile Thread shellThread;
+
public StartShellJob(BundleContext context, CommandProcessor processor)
{
@@ -187,6 +197,7 @@
public void run()
{
+ shellThread = Thread.currentThread();
session = processor.createSession(new
FileInputStream(FileDescriptor.in),
new
FileOutputStream(FileDescriptor.out),
new
FileOutputStream(FileDescriptor.err));
@@ -231,7 +242,9 @@
session.close();
session = null;
}
- Thread.currentThread().interrupt();
+ if (shellThread != null) {
+ shellThread.interrupt();
+ }
}
}
}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/org.apache.felix.gogo.shell-1.1.0/src/main/java/org/apache/felix/gogo/shell/Builtin.java
new/org.apache.felix.gogo.shell-1.1.4/src/main/java/org/apache/felix/gogo/shell/Builtin.java
---
old/org.apache.felix.gogo.shell-1.1.0/src/main/java/org/apache/felix/gogo/shell/Builtin.java
2018-06-14 20:38:34.000000000 +0200
+++
new/org.apache.felix.gogo.shell-1.1.4/src/main/java/org/apache/felix/gogo/shell/Builtin.java
2020-10-05 18:20:45.000000000 +0200
@@ -60,7 +60,7 @@
{
return format(session, session.get("_")); // last result
}
-
+
public CharSequence format(CommandSession session, Object arg)
{
CharSequence result = session.format(arg, Converter.INSPECT);
@@ -70,6 +70,9 @@
/**
* script access to Options.
+ * @param spec the spec
+ * @param args the args
+ * @return Option
*/
public Option getopt(List<Object> spec, Object[] args)
{
@@ -310,7 +313,7 @@
opt.usage();
return true;
}
-
+
boolean all = opt.isSet("all");
String optScope = null;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/org.apache.felix.gogo.shell-1.1.0/src/main/java/org/apache/felix/gogo/shell/Converters.java
new/org.apache.felix.gogo.shell-1.1.4/src/main/java/org/apache/felix/gogo/shell/Converters.java
---
old/org.apache.felix.gogo.shell-1.1.0/src/main/java/org/apache/felix/gogo/shell/Converters.java
2018-06-14 20:38:34.000000000 +0200
+++
new/org.apache.felix.gogo.shell-1.1.4/src/main/java/org/apache/felix/gogo/shell/Converters.java
2020-10-05 18:20:45.000000000 +0200
@@ -31,7 +31,7 @@
import org.osgi.framework.BundleContext;
import org.osgi.framework.InvalidSyntaxException;
import org.osgi.framework.ServiceReference;
-import org.osgi.service.startlevel.StartLevel;
+import org.osgi.framework.startlevel.BundleStartLevel;
public class Converters implements Converter
{
@@ -45,27 +45,13 @@
private CharSequence print(Bundle bundle)
{
// [ ID ] [STATE ] [ SL ] symname
- StartLevel sl = null;
- ServiceReference ref =
context.getServiceReference(StartLevel.class.getName());
- if (ref != null)
- {
- sl = (StartLevel) context.getService(ref);
- }
-
- if (sl == null)
- {
- return String.format("%5d|%-11s|%s (%s)", bundle.getBundleId(),
- getState(bundle), bundle.getSymbolicName(),
bundle.getVersion());
- }
-
- int level = sl.getBundleStartLevel(bundle);
- context.ungetService(ref);
+ int level = bundle.adapt(BundleStartLevel.class).getStartLevel();
return String.format("%5d|%-11s|%5d|%s (%s)", bundle.getBundleId(),
getState(bundle), level, bundle.getSymbolicName(),
bundle.getVersion());
}
- private CharSequence print(ServiceReference ref)
+ private CharSequence print(ServiceReference<?> ref)
{
String spid = "";
Object pid = ref.getProperty("service.pid");
@@ -188,7 +174,7 @@
String s = in.toString();
if (s.startsWith("(") && s.endsWith(")"))
{
- ServiceReference refs[] = context.getServiceReferences((String)
null, String.format(
+ ServiceReference<?> refs[] = context.getServiceReferences((String)
null, String.format(
"(|(service.id=%s)(service.pid=%s))", in, in));
if (refs != null && refs.length > 0)
{
@@ -196,7 +182,7 @@
}
}
- ServiceReference refs[] = context.getServiceReferences((String) null,
String.format(
+ ServiceReference<?> refs[] = context.getServiceReferences((String)
null, String.format(
"(|(service.id=%s)(service.pid=%s))", in, in));
if (refs != null && refs.length > 0)
{
@@ -248,7 +234,7 @@
}
if (level == LINE && target instanceof ServiceReference)
{
- return print((ServiceReference) target);
+ return print((ServiceReference<?>) target);
}
if (level == PART && target instanceof Bundle)
{
@@ -256,7 +242,7 @@
}
if (level == PART && target instanceof ServiceReference)
{
- return getShortNames((String[]) ((ServiceReference)
target).getProperty("objectclass"));
+ return getShortNames((String[]) ((ServiceReference<?>)
target).getProperty("objectclass"));
}
return null;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/org.apache.felix.gogo.shell-1.1.0/src/main/java/org/apache/felix/gogo/shell/Posix.java
new/org.apache.felix.gogo.shell-1.1.4/src/main/java/org/apache/felix/gogo/shell/Posix.java
---
old/org.apache.felix.gogo.shell-1.1.0/src/main/java/org/apache/felix/gogo/shell/Posix.java
2018-06-14 20:38:34.000000000 +0200
+++
new/org.apache.felix.gogo.shell-1.1.4/src/main/java/org/apache/felix/gogo/shell/Posix.java
2020-10-05 18:20:45.000000000 +0200
@@ -34,8 +34,8 @@
/**
* Posix-like utilities.
- *
- * @see http://www.opengroup.org/onlinepubs/009695399/utilities/contents.html
+ *
+ * See http://www.opengroup.org/onlinepubs/009695399/utilities/contents.html
*/
public class Posix
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/org.apache.felix.gogo.shell-1.1.0/src/main/java/org/apache/felix/gogo/shell/Telnet.java
new/org.apache.felix.gogo.shell-1.1.4/src/main/java/org/apache/felix/gogo/shell/Telnet.java
---
old/org.apache.felix.gogo.shell-1.1.0/src/main/java/org/apache/felix/gogo/shell/Telnet.java
2018-06-14 20:38:34.000000000 +0200
+++
new/org.apache.felix.gogo.shell-1.1.4/src/main/java/org/apache/felix/gogo/shell/Telnet.java
2020-10-05 18:20:45.000000000 +0200
@@ -138,25 +138,27 @@
PrintStream out = new PrintStream(socket.getOutputStream());
final CommandSession session = processor.createSession(
socket.getInputStream(), out, out);
-
- Thread handler = new Thread(() -> {
- try
- {
- session.execute("gosh --login --noshutdown");
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- finally
- {
- session.close();
+ Thread handler = new Thread(new Runnable() {
+ @Override
+ public void run() {
try
{
- socket.close();
+ session.execute("gosh --login --noshutdown");
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
}
- catch (IOException e)
+ finally
{
+ session.close();
+ try
+ {
+ socket.close();
+ }
+ catch (IOException e)
+ {
+ }
}
}
});
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/org.apache.felix.gogo.shell-1.1.0/src/main/java/org/apache/felix/gogo/shell/package-info.java
new/org.apache.felix.gogo.shell-1.1.4/src/main/java/org/apache/felix/gogo/shell/package-info.java
---
old/org.apache.felix.gogo.shell-1.1.0/src/main/java/org/apache/felix/gogo/shell/package-info.java
1970-01-01 01:00:00.000000000 +0100
+++
new/org.apache.felix.gogo.shell-1.1.4/src/main/java/org/apache/felix/gogo/shell/package-info.java
2020-10-05 18:20:45.000000000 +0200
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
[email protected](
+ attribute = "implementation.name=gogo.shell",
+ namespace = "org.apache.felix.gogo",
+ name = "shell.implementation",
+ version = "1.0.0"
+)
+@Requirement(
+ effective = "active",
+ namespace = "org.apache.felix.gogo",
+ name = "command.implementation",
+ version = "1.0.0"
+)
+package org.apache.felix.gogo.shell;
+
+import org.osgi.annotation.bundle.Requirement;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/org.apache.felix.gogo.shell-1.1.0/src/main/resources/gosh_profile
new/org.apache.felix.gogo.shell-1.1.4/src/main/resources/gosh_profile
--- old/org.apache.felix.gogo.shell-1.1.0/src/main/resources/gosh_profile
2018-06-14 20:38:34.000000000 +0200
+++ new/org.apache.felix.gogo.shell-1.1.4/src/main/resources/gosh_profile
2020-10-05 18:20:45.000000000 +0200
@@ -1,3 +1,21 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
# default gosh_profile
# only read if etc/gosh_profile doesn't exist relative to the System property
# gosh.home or failing that the current directory.